#NEWLINE# def identify_tx_status( self , txhash ) : #NEWLINE# #INDENT# ( block_hash , in_mempool ) = self . bs . get_tx_blockhash ( txhash ) #NEWLINE# if ( ( not block_hash ) and ( not in_mempool ) ) : #NEWLINE# #INDENT# return TX_STATUS_INVALID #NEWLINE# #UNINDENT# if ( not block_hash ) : #NEWLINE# #INDENT# return TX_STATUS_UNCONFIRMED #NEWLINE# #UNINDENT# confirmations = self . get_confirmations ( txhash ) #NEWLINE# if ( confirmations is None ) : #NEWLINE# #INDENT# verified = self . _verify_merkle ( txhash ) #NEWLINE# if verified : #NEWLINE# #INDENT# return self . identify_tx_status ( txhash ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return TX_STATUS_UNCONFIRMED #NEWLINE# #UNINDENT# #UNINDENT# if ( confirmations == 0 ) : #NEWLINE# #INDENT# return TX_STATUS_UNCONFIRMED #NEWLINE# #UNINDENT# return TX_STATUS_CONFIRMED