From 848b78f848d5b9d670ba494c83f76d517a1b8935 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 6 Apr 2020 23:01:14 -0400 Subject: [PATCH] Return early for unknown txs and log unconfirmed --- src/komodo_bitcoind.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index b5e825a58..39cf5da63 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -71,6 +71,7 @@ int tx_height( const uint256 &hash ){ uint256 hashBlock; if (!GetTransaction(hash, tx, hashBlock, true)) { fprintf(stderr,"tx hash %s does not exist!\n", hash.ToString().c_str() ); + return nHeight; } BlockMap::const_iterator it = mapBlockIndex.find(hashBlock); @@ -79,6 +80,7 @@ int tx_height( const uint256 &hash ){ //fprintf(stderr,"blockHash %s height %d\n",hashBlock.ToString().c_str(), nHeight); } else { // Unconfirmed xtns + fprintf(stderr,"tx %s is unconfirmed\n", hash.ToString().c_str() ); //fprintf(stderr,"block hash %s does not exist!\n", hashBlock.ToString().c_str() ); } return nHeight;