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