Open RD4Fun opened 8 months ago
ran the code 48 hours later and it does not fault working on a example that always faults
When you use the SubstrateNodeExtension
it's not really deterministic, because it tries to find an acceptable block number after doing predictions based on the time between blocks. The tolerance is also one block time length (usually 6 seconds). You can see that logic here. Maybe this needs to be tweaks.
Turning on the DEBUG logging while reveal more info:
import logging
logging.basicConfig(level=logging.DEBUG)
You could also consider - if you have a Subsquid endpoint available for this network - to utilize the SubsquidExtension
, this would be a more efficient and solution and has more predictable results.
the extensions "search_block_number" does not behave as I expected I expected the block closest to the search time![image](https://github.com/polkascan/py-substrate-interface/assets/119458939/ecfe62cf-bfaa-4a0f-ab38-ed1da8d27231)
Name: substrate-interface Version: 1.7.4 python 3.10 Code to generate output below