mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 01:56:44 +00:00
add method to warm the pubkey cache
This commit is contained in:
parent
cd1e21ebaa
commit
bd01cb8730
1 changed files with 11 additions and 0 deletions
|
@ -740,6 +740,17 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void derivePublicKeys() {
|
||||||
|
for(KeyPurpose keyPurpose : KeyPurpose.DEFAULT_PURPOSES) {
|
||||||
|
WalletNode purposeNode = getNode(keyPurpose);
|
||||||
|
for(WalletNode addressNode : purposeNode.getChildren()) {
|
||||||
|
for(Keystore keystore : getKeystores()) {
|
||||||
|
keystore.getPubKey(addressNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isWalletTxo(TransactionInput txInput) {
|
public boolean isWalletTxo(TransactionInput txInput) {
|
||||||
return getWalletTxos().keySet().stream().anyMatch(ref -> ref.getHash().equals(txInput.getOutpoint().getHash()) && ref.getIndex() == txInput.getOutpoint().getIndex());
|
return getWalletTxos().keySet().stream().anyMatch(ref -> ref.getHash().equals(txInput.getOutpoint().getHash()) && ref.getIndex() == txInput.getOutpoint().getIndex());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue