Fix crash on empty mempool
This commit is contained in:
parent
0e297c6694
commit
3854a9e0eb
|
@ -40,7 +40,7 @@ class JSONRPCDaemon(object):
|
||||||
def get_mempool(self):
|
def get_mempool(self):
|
||||||
res = self.raw_request('/get_transaction_pool', {})
|
res = self.raw_request('/get_transaction_pool', {})
|
||||||
txs = []
|
txs = []
|
||||||
for tx in res['transactions']:
|
for tx in res.get('transactions', []):
|
||||||
txs.append(Transaction(
|
txs.append(Transaction(
|
||||||
hash=tx['id_hash'],
|
hash=tx['id_hash'],
|
||||||
fee=from_atomic(tx['fee']),
|
fee=from_atomic(tx['fee']),
|
||||||
|
|
Loading…
Reference in New Issue