Fix crash on empty mempool

This commit is contained in:
Michał Sałaban 2018-01-22 04:03:40 +01:00
parent 0e297c6694
commit 3854a9e0eb
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class JSONRPCDaemon(object):
def get_mempool(self):
res = self.raw_request('/get_transaction_pool', {})
txs = []
for tx in res['transactions']:
for tx in res.get('transactions', []):
txs.append(Transaction(
hash=tx['id_hash'],
fee=from_atomic(tx['fee']),