mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 10:06:45 +00:00
save block height for current stored transactions
This commit is contained in:
parent
0d56692784
commit
728b6ce5ef
1 changed files with 9 additions and 0 deletions
|
@ -22,6 +22,7 @@ public class Wallet {
|
|||
private List<Keystore> keystores = new ArrayList<>();
|
||||
private final Set<WalletNode> purposeNodes = new TreeSet<>();
|
||||
private final Map<Sha256Hash, BlockTransaction> transactions = new HashMap<>();
|
||||
private Integer storedBlockHeight;
|
||||
|
||||
public Wallet() {
|
||||
}
|
||||
|
@ -86,6 +87,14 @@ public class Wallet {
|
|||
return transactions;
|
||||
}
|
||||
|
||||
public Integer getStoredBlockHeight() {
|
||||
return storedBlockHeight;
|
||||
}
|
||||
|
||||
public void setStoredBlockHeight(Integer storedBlockHeight) {
|
||||
this.storedBlockHeight = storedBlockHeight;
|
||||
}
|
||||
|
||||
public WalletNode getNode(KeyPurpose keyPurpose) {
|
||||
WalletNode purposeNode;
|
||||
Optional<WalletNode> optionalPurposeNode = purposeNodes.stream().filter(node -> node.getKeyPurpose().equals(keyPurpose)).findFirst();
|
||||
|
|
Loading…
Reference in a new issue