add wallet watchLast field

This commit is contained in:
Craig Raw 2022-01-19 13:48:20 +02:00
parent 34bd72d87a
commit 8dca2ee3f0
2 changed files with 14 additions and 0 deletions

View file

@ -41,6 +41,7 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
private final Map<Sha256Hash, UtxoMixData> utxoMixes = new HashMap<>(); private final Map<Sha256Hash, UtxoMixData> utxoMixes = new HashMap<>();
private Integer storedBlockHeight; private Integer storedBlockHeight;
private Integer gapLimit; private Integer gapLimit;
private Integer watchLast;
private Date birthDate; private Date birthDate;
public Wallet() { public Wallet() {
@ -339,6 +340,14 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
this.gapLimit = gapLimit; this.gapLimit = gapLimit;
} }
public Integer getWatchLast() {
return watchLast;
}
public void setWatchLast(Integer watchLast) {
this.watchLast = watchLast;
}
public Date getBirthDate() { public Date getBirthDate() {
return birthDate; return birthDate;
} }
@ -1463,6 +1472,7 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
} }
copy.setStoredBlockHeight(getStoredBlockHeight()); copy.setStoredBlockHeight(getStoredBlockHeight());
copy.gapLimit = gapLimit; copy.gapLimit = gapLimit;
copy.watchLast = watchLast;
copy.birthDate = birthDate; copy.birthDate = birthDate;
return copy; return copy;

View file

@ -94,6 +94,10 @@ public class WalletNode extends Persistable implements Comparable<WalletNode> {
this.children = children; this.children = children;
} }
public boolean isUsed() {
return !transactionOutputs.isEmpty();
}
public Set<BlockTransactionHashIndex> getTransactionOutputs() { public Set<BlockTransactionHashIndex> getTransactionOutputs() {
return transactionOutputs; return transactionOutputs;
} }