parent
068e230616
commit
2cb89814b6
@ -852,6 +852,9 @@ class Controller(ServerBase):
|
|||||||
verbose: passed on to the daemon
|
verbose: passed on to the daemon
|
||||||
'''
|
'''
|
||||||
self.assert_tx_hash(tx_hash)
|
self.assert_tx_hash(tx_hash)
|
||||||
|
if verbose not in (True, False):
|
||||||
|
raise RPCError(BAD_REQUEST, f'"verbose" must be a boolean')
|
||||||
|
|
||||||
return await self.daemon_request('getrawtransaction', tx_hash, verbose)
|
return await self.daemon_request('getrawtransaction', tx_hash, verbose)
|
||||||
|
|
||||||
async def transaction_get_merkle(self, tx_hash, height):
|
async def transaction_get_merkle(self, tx_hash, height):
|
||||||
|
|||||||
@ -265,13 +265,13 @@ 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.'''
|
||||||
return await self._send_single('getrawtransaction',
|
return await self._send_single('getrawtransaction',
|
||||||
(hex_hash, int(verbose)))
|
(hex_hash, 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.
|
||||||
|
|
||||||
Replaces errors with None by default.'''
|
Replaces errors with None by default.'''
|
||||||
params_iterable = ((hex_hash, 0) for hex_hash in hex_hashes)
|
params_iterable = ((hex_hash, False) for hex_hash in hex_hashes)
|
||||||
txs = await self._send_vector('getrawtransaction', params_iterable,
|
txs = await self._send_vector('getrawtransaction', params_iterable,
|
||||||
replace_errs=replace_errs)
|
replace_errs=replace_errs)
|
||||||
# Convert hex strings to bytes
|
# Convert hex strings to bytes
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user