public DeterministicKey findKeyFromPubHash(byte[] pubkeyHash) { lock.lock(); try { return (DeterministicKey) basicKeyChain.findKeyFromPubHash(pubkeyHash); } finally { lock.unlock(); } }
/** * Mark the DeterministicKeys as used, if they match the pubkeyHash See {@link * com.google.bitcoin.wallet.DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info * on this. */ @Nullable public DeterministicKey markPubHashAsUsed(byte[] pubkeyHash) { lock.lock(); try { DeterministicKey k = (DeterministicKey) basicKeyChain.findKeyFromPubHash(pubkeyHash); if (k != null) markKeyAsUsed(k); return k; } finally { lock.unlock(); } }