question: @ Nullable public ECKey findKeyFromPubHash ( byte [ ] pubkeyHash ) { lock . lock ( ) ; try { for ( ECKey key : keychain ) { if ( Arrays . equals ( key . getPubKeyHash ( ) , pubkeyHash ) ) return key ; } return null ; } finally { lock . unlock ( ) ; } }
target:  Locates a keypair from the keychain given the hash of the public key. This is needed when finding out which key we need to use to redeem a transaction output.