repro: https://github.com/publicqi/revm_hang
If a EthersDB is constructed in an async test function (or single-threaded executor) with no block number specified, the program will hang.
#[tokio::test] uses a single-threaded runtime. revm submits the get_block_number using futures::executor::block_on, but this task will never execute since the runtime is always polling the previous task (test_hang, in this case).
Some refs when digging into the bug:
tokio-rs/tokio#2603
tokio-rs/tokio#2376
repro: https://github.com/publicqi/revm_hang
If a EthersDB is constructed in an async test function (or single-threaded executor) with no block number specified, the program will hang.
#[tokio::test]uses a single-threaded runtime. revm submits theget_block_numberusingfutures::executor::block_on, but this task will never execute since the runtime is always polling the previous task (test_hang, in this case).Some refs when digging into the bug:
tokio-rs/tokio#2603
tokio-rs/tokio#2376