Skip to content
Snippets Groups Projects
Commit 6041bba0 authored by Simon Könnecke's avatar Simon Könnecke
Browse files

add transactionHistory

parent 3a406e06
Branches
No related tags found
No related merge requests found
package fucoin; package fucoin;
import java.io.Serializable; import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
public class Statistics implements Serializable { public class Statistics implements Serializable {
/** /**
...@@ -12,6 +14,8 @@ public class Statistics implements Serializable { ...@@ -12,6 +14,8 @@ public class Statistics implements Serializable {
*/ */
private transient QDigest qDigest = new QDigest(sCompression); private transient QDigest qDigest = new QDigest(sCompression);
private List<Integer> transactionHistory = new LinkedList<>();
public QDigest getqDigest() { public QDigest getqDigest() {
return qDigest; return qDigest;
} }
...@@ -19,4 +23,12 @@ public class Statistics implements Serializable { ...@@ -19,4 +23,12 @@ public class Statistics implements Serializable {
public void setqDigest(QDigest qDigest) { public void setqDigest(QDigest qDigest) {
this.qDigest = qDigest; this.qDigest = qDigest;
} }
public void addTransaction(int amount) {
transactionHistory.add(amount);
}
public List<Integer> getTransactionHistory() {
return transactionHistory;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment