public boolean isTransactionRelevant ( Transaction tx ) throws ScriptException { lock . lock ( ) ; try { return tx . getValueSentFromMe ( this ) . signum ( ) > 0 || tx . getValueSentToMe ( this ) . signum ( ) > 0 || ! findDoubleSpendsAgainst ( tx , transactions ) . isEmpty ( ) ; } finally { lock . unlock ( ) ; } }
< p > Returns true if the given transaction sends coins to any of our keys , or has inputs spending any of our outputs , and also returns true if tx has inputs that are spending outputs which are not ours but which are spent by pending transactions. < /p > < p > Note that if the tx has inputs containing one of our keys , but the connected transaction is not in the wallet , it will not be considered relevant. < /p >