private void maybeMovePool(Transaction tx,String context){
  checkState(lock.isHeldByCurrentThread());
  if (tx.isEveryOwnedOutputSpent(this)) {
    if (unspent.remove(tx.getHash()) != null) {
      if (log.isInfoEnabled()) {
        log.info("  {} {} <-unspent ->spent",tx.getHashAsString(),context);
      }
      spent.put(tx.getHash(),tx);
    }
  }
 else {
    if (spent.remove(tx.getHash()) != null) {
      if (log.isInfoEnabled()) {
        log.info("  {} {} <-spent ->unspent",tx.getHashAsString(),context);
      }
      unspent.put(tx.getHash(),tx);
    }
  }
}

private void maybeMovePool ( Transaction tx , String context ) { checkState ( lock . isHeldByCurrentThread ( ) ) ; if ( tx . isEveryOwnedOutputSpent ( this ) ) { if ( unspent . remove ( tx . getHash ( ) ) != null ) { if ( log . isInfoEnabled ( ) ) { log . info ( "  {} {} <-unspent ->spent" , tx . getHashAsString ( ) , context ) ; } spent . put ( tx . getHash ( ) , tx ) ; } } else { if ( spent . remove ( tx . getHash ( ) ) != null ) { if ( log . isInfoEnabled ( ) ) { log . info ( "  {} {} <-spent ->unspent" , tx . getHashAsString ( ) , context ) ; } unspent . put ( tx . getHash ( ) , tx ) ; } } }
if the transactions outputs are all marked as spent , and it ' s in the unspent map , move it . if the owned transactions outputs are not all marked as spent , and it ' s in the spent map , move it .
