diff --git a/tests/simulator/bitcoind_sim.py b/tests/simulator/bitcoind_sim.py index 06cfeae..d9b902d 100644 --- a/tests/simulator/bitcoind_sim.py +++ b/tests/simulator/bitcoind_sim.py @@ -77,7 +77,7 @@ def process_request(): if isinstance(txid, str): if check_txid_format(txid): - if txid not in mempool and txid not in list(mined_transactions.keys()): + if txid not in list(mined_transactions.keys()): mempool.append(txid) else: @@ -100,6 +100,9 @@ def process_request(): if block: response["result"] = {"confirmations": len(blockchain) - block.get('height')} + elif txid in mempool: + response["result"] = {"confirmations": 0} + else: response["error"] = {'code': RPC_INVALID_ADDRESS_OR_KEY, 'message': 'No such mempool or blockchain transaction. Use gettransaction for '