From 728b6ce5ef21233b5e1687d3fb4277b79eb2e4e1 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 10 Jun 2020 16:14:57 +0200 Subject: [PATCH] save block height for current stored transactions --- .../java/com/sparrowwallet/drongo/wallet/Wallet.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java b/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java index 311125f..f21dd35 100644 --- a/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java +++ b/src/main/java/com/sparrowwallet/drongo/wallet/Wallet.java @@ -22,6 +22,7 @@ public class Wallet { private List keystores = new ArrayList<>(); private final Set purposeNodes = new TreeSet<>(); private final Map 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 optionalPurposeNode = purposeNodes.stream().filter(node -> node.getKeyPurpose().equals(keyPurpose)).findFirst();