Browse Source

Merge #752: Handle None return from _rpc() in get_transaction()

0e483f1 Handle None return from _rpc() in get_transaction() (Adam Gibson)
master
Adam Gibson 5 years ago
parent
commit
08b1c58cf4
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 3
      jmclient/jmclient/blockchaininterface.py

3
jmclient/jmclient/blockchaininterface.py

@ -341,6 +341,9 @@ class BitcoinCoreInterface(BlockchainInterface):
log.warn("Failed gettransaction call; unexpected error:")
log.warn(str(e))
return None
if res is None:
# happens in case of rpc connection failure:
return None
if "confirmations" not in res:
log.warning("Malformed gettx result: " + str(res))
return None

Loading…
Cancel
Save