public boolean hasKey(ECKey key){
  lock.lock();
  try {
    return keychain.contains(key);
  }
  finally {
    lock.unlock();
  }
}

public boolean hasKey ( ECKey key ) { lock . lock ( ) ; try { return keychain . contains ( key ) ; } finally { lock . unlock ( ) ; } }
returns true if the given key is in the wallet , false otherwise . currently an o ( n ) operation .
