From 76bd3090d112a56f85a511ba6189d24846c5dd71 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 27 Jun 2023 15:24:01 +0200 Subject: [PATCH] Fix intermittently failing test eth_getFilterChanges returns the current block for new subscriptions, which made the test fail. --- testmodule/providers/jsonrpc/testJsonRpcProvider.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/testmodule/providers/jsonrpc/testJsonRpcProvider.nim b/testmodule/providers/jsonrpc/testJsonRpcProvider.nim index 3895dbe..5f1a483 100644 --- a/testmodule/providers/jsonrpc/testJsonRpcProvider.nim +++ b/testmodule/providers/jsonrpc/testJsonRpcProvider.nim @@ -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)