small fixes

This commit is contained in:
Sergi Delgado Segura
2019-08-26 16:28:05 +02:00
parent ebac9b003e
commit ea037da530

View File

@@ -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 '