From 0f25db2c8555e713f3d59835862ecb46c6f84f19 Mon Sep 17 00:00:00 2001 From: antazoey Date: Fri, 31 Jan 2025 11:02:21 -0600 Subject: [PATCH] perf: clear all web3 middleware --- tests/functional/geth/test_provider.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/functional/geth/test_provider.py b/tests/functional/geth/test_provider.py index b2f32b8a57..68738e17d2 100644 --- a/tests/functional/geth/test_provider.py +++ b/tests/functional/geth/test_provider.py @@ -332,6 +332,13 @@ def test_connect_request_headers(project, geth_provider, networks): assert "custom-geth-client/v100" in actual["User-Agent"] +def test_connect_no_middleware(geth_provider): + actual = [x for x in geth_provider.web3.middleware_onion] + # NOTE: There is like 6 default, but for some reason, there is still 1 + # when not using any, not sure why, but at least we did what we can. + assert len(actual) <= 1 + + @geth_process_test @pytest.mark.parametrize("block_id", (0, "0", "0x0", HexStr("0x0"))) def test_get_block(geth_provider, block_id):