Skip to content

Commit 5cb954a

Browse files
committed
fix mev blocker kickbacks test
1 parent 213dd6d commit 5cb954a

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

src/apis/web3api.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ def get_eth_transfers_by_block_range(
103103
return None
104104
total_transfers_in_eth = 0.0
105105
for txs in log_receipts:
106-
if (
107-
txs["topics"][0].hex()
108-
== "0x3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d"
106+
if txs["topics"][0] == HexBytes(
107+
"0x3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d"
109108
):
110109
total_transfers_in_eth += int(txs["data"].hex(), 16) / 10**18
111110
return total_transfers_in_eth
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"""
2+
Tests for large score test.
3+
"""
4+
5+
import unittest
6+
from src.monitoring_tests.mev_blocker_kickbacks_test import (
7+
MEVBlockerRefundsMonitoringTest,
8+
)
9+
10+
11+
class TestHighScore(unittest.TestCase):
12+
def test_high_score(self) -> None:
13+
high_score_test = MEVBlockerRefundsMonitoringTest()
14+
# large kickback tx
15+
tx_hash = "0xcbf4677177fb320b7e000ca95b31b5259648c75ebcfa9544014298ddfea94282"
16+
self.assertTrue(high_score_test.run(tx_hash))
17+
18+
# no kickback tx
19+
tx_hash = "0x3198bc18bc41ec3eb35cc382697d18917ebdaf03528e7dcc5270488d156037c8"
20+
self.assertTrue(high_score_test.run(tx_hash))
21+
22+
23+
if __name__ == "__main__":
24+
unittest.main()

0 commit comments

Comments
 (0)