#NEWLINE# def identify_tx_status( self , txhash ) : #NEWLINE# #INDENT# if ( txhash in self . confirmed_txs ) : #NEWLINE# #INDENT# return TX_STATUS_CONFIRMED #NEWLINE# #UNINDENT# confirmations = self . get_tx_confirmations ( txhash ) #NEWLINE# if ( confirmations > 0 ) : #NEWLINE# #INDENT# self . confirmed_txs . add ( txhash ) #NEWLINE# return TX_STATUS_CONFIRMED #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( confirmations == 0 ) : #NEWLINE# #INDENT# return TX_STATUS_UNCONFIRMED #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( block_hash , in_mempool ) = self . model . get_blockchain_state ( ) . get_tx_blockhash ( txhash ) #NEWLINE# if ( block_hash or in_mempool ) : #NEWLINE# #INDENT# return TX_STATUS_UNCONFIRMED #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return TX_STATUS_INVALID