mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-05 03:26:43 +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 List<Keystore> keystores = new ArrayList<>();
|
||||||
private final Set<WalletNode> purposeNodes = new TreeSet<>();
|
private final Set<WalletNode> purposeNodes = new TreeSet<>();
|
||||||
private final Map<Sha256Hash, BlockTransaction> transactions = new HashMap<>();
|
private final Map<Sha256Hash, BlockTransaction> transactions = new HashMap<>();
|
||||||
|
private Integer storedBlockHeight;
|
||||||
|
|
||||||
public Wallet() {
|
public Wallet() {
|
||||||
}
|
}
|
||||||
|
@ -86,6 +87,14 @@ public class Wallet {
|
||||||
return transactions;
|
return transactions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getStoredBlockHeight() {
|
||||||
|
return storedBlockHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStoredBlockHeight(Integer storedBlockHeight) {
|
||||||
|
this.storedBlockHeight = storedBlockHeight;
|
||||||
|
}
|
||||||
|
|
||||||
public WalletNode getNode(KeyPurpose keyPurpose) {
|
public WalletNode getNode(KeyPurpose keyPurpose) {
|
||||||
WalletNode purposeNode;
|
WalletNode purposeNode;
|
||||||
Optional<WalletNode> optionalPurposeNode = purposeNodes.stream().filter(node -> node.getKeyPurpose().equals(keyPurpose)).findFirst();
|
Optional<WalletNode> optionalPurposeNode = purposeNodes.stream().filter(node -> node.getKeyPurpose().equals(keyPurpose)).findFirst();
|
||||||
|
|
Loading…
Reference in a new issue