Fix intermittently failing test

eth_getFilterChanges returns the current block for
new subscriptions, which made the test fail.
This commit is contained in:
Mark Spanbroek 2023-06-27 15:24:01 +02:00 committed by markspanbroek
parent 1b151d589d
commit 76bd3090d1
1 changed files with 1 additions and 0 deletions

View File

@ -42,6 +42,7 @@ for url in ["ws://localhost:8545", "http://localhost:8545"]:
test "subscribes to new blocks":
let oldBlock = !await provider.getBlock(BlockTag.latest)
discard await provider.send("evm_mine")
var newBlock: Block
let blockHandler = proc(blck: Block) {.async.} = newBlock = blck
let subscription = await provider.subscribe(blockHandler)