From d200c847f0b36743d7060870fce13cbe0a828b7c Mon Sep 17 00:00:00 2001 From: Roy Lee Date: Mon, 8 Nov 2021 16:03:19 -0800 Subject: [PATCH] test: update some RPC arguments to int type --- lbry/wallet/server/daemon.py | 4 ++-- lbry/wallet/server/session.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lbry/wallet/server/daemon.py b/lbry/wallet/server/daemon.py index c487de0c7..a6b312450 100644 --- a/lbry/wallet/server/daemon.py +++ b/lbry/wallet/server/daemon.py @@ -250,14 +250,14 @@ class Daemon: async def deserialised_block(self, hex_hash): """Return the deserialised block with the given hex hash.""" if hex_hash not in self._block_cache: - block = await self._send_single('getblock', (hex_hash, True)) + block = await self._send_single('getblock', (hex_hash, 1)) self._block_cache[hex_hash] = block return block return self._block_cache[hex_hash] async def raw_blocks(self, hex_hashes): """Return the raw binary blocks with the given hex hashes.""" - params_iterable = ((h, False) for h in hex_hashes) + params_iterable = ((h, 0) for h in hex_hashes) blocks = await self._send_vector('getblock', params_iterable) # Convert hex string to bytes return [hex_to_bytes(block) for block in blocks] diff --git a/lbry/wallet/server/session.py b/lbry/wallet/server/session.py index 4ff192dc5..dfc93ea15 100644 --- a/lbry/wallet/server/session.py +++ b/lbry/wallet/server/session.py @@ -1472,7 +1472,7 @@ class LBRYElectrumX(SessionBase): if mempool_tx: raw_tx, block_hash = mempool_tx.raw_tx.hex(), None else: - tx_info = await self.daemon_request('getrawtransaction', tx_hash, True) + tx_info = await self.daemon_request('getrawtransaction', tx_hash, 1) raw_tx = tx_info['hex'] block_hash = tx_info.get('blockhash') if block_hash: @@ -1509,7 +1509,7 @@ class LBRYElectrumX(SessionBase): 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, int(verbose)) def _get_merkle_branch(self, tx_hashes, tx_pos): """Return a merkle branch to a transaction.