Cast verbose to int for daemon RPC

Fixes #506
This commit is contained in:
Neil Booth 2018-07-03 18:16:41 -07:00
parent cc36935f5b
commit f2f19aeffc

View File

@ -264,8 +264,9 @@ class Daemon(object):
async def getrawtransaction(self, hex_hash, verbose=False): async def getrawtransaction(self, hex_hash, verbose=False):
'''Return the serialized raw transaction with the given hash.''' '''Return the serialized raw transaction with the given hash.'''
# Cast to int because some coin daemons are old and require it
return await self._send_single('getrawtransaction', return await self._send_single('getrawtransaction',
(hex_hash, verbose)) (hex_hash, int(verbose)))
async def getrawtransactions(self, hex_hashes, replace_errs=True): async def getrawtransactions(self, hex_hashes, replace_errs=True):
'''Return the serialized raw transactions with the given hashes. '''Return the serialized raw transactions with the given hashes.