Skip to content

Commit

Permalink
perf: clear all web3 middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Jan 31, 2025
1 parent 7874474 commit 0f25db2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/functional/geth/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0f25db2

Please sign in to comment.