Skip to content

Commit 6a80257

Browse files
committed
balance is not available when wallet is configured off in bitcoind
1 parent b77d4a1 commit 6a80257

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

bitcoin/rpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ def getblockhash(self, height):
256256
def getinfo(self):
257257
"""Return an object containing various state info"""
258258
r = self._call('getinfo')
259-
r['balance'] = int(r['balance'] * COIN)
259+
if 'balance' in r:
260+
r['balance'] = int(r['balance'] * COIN)
260261
r['paytxfee'] = int(r['paytxfee'] * COIN)
261262
return r
262263

0 commit comments

Comments
 (0)