From a0971f634f0626a6580b298b56eb40456d0c3ca1 Mon Sep 17 00:00:00 2001 From: EmelyanenkoK Date: Thu, 17 Nov 2022 12:21:42 +0300 Subject: [PATCH] Try shardchains from exact and future masterblocks --- pytonlib/client.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pytonlib/client.py b/pytonlib/client.py index e9ce599..1e0ea35 100644 --- a/pytonlib/client.py +++ b/pytonlib/client.py @@ -661,11 +661,14 @@ async def try_locate_tx_by_incoming_message(self, source, destination, creation_ dest = detect_address(destination) workchain = dest["raw_form"].split(":")[0] shards = await self.get_shards(lt=int(creation_lt)) + next_shards = await self.get_shards(lt=int(creation_lt)+1000000) + shardchains = set([i['shard'] for i in shards['shards']] + [i['shard'] for i in next_shards['shards']]); - for shard_data in shards['shards']: - shardchain = shard_data['shard'] + for shardchain in shardchains: for b in range(3): block = await self.lookup_block(workchain, shardchain, lt=int(creation_lt) + b * 1000000) + if block.get('@type', 'error') == 'error': + continue txs = await self.get_block_transactions(workchain, shardchain, block["seqno"],