From 6dfcd39b1be28e106c55316fe25d63bf98120839 Mon Sep 17 00:00:00 2001 From: Dustin Xie Date: Wed, 18 Oct 2023 22:47:00 -0700 Subject: [PATCH] [evm] correct test --- action/protocol/execution/protocol_test.go | 4 ++-- .../testdata-london/CVE-2021-39137-attack-replay.json | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/action/protocol/execution/protocol_test.go b/action/protocol/execution/protocol_test.go index d33fb28aa5..2d705564c5 100644 --- a/action/protocol/execution/protocol_test.go +++ b/action/protocol/execution/protocol_test.go @@ -1047,7 +1047,7 @@ func TestIstanbulEVM(t *testing.T) { NewSmartContractTest(t, "testdata-istanbul/datacopy.json") }) t.Run("CVE-2021-39137-attack-replay", func(t *testing.T) { - NewSmartContractTest(t, "testdata/CVE-2021-39137-attack-replay.json") + NewSmartContractTest(t, "testdata-istanbul/CVE-2021-39137-attack-replay.json") }) t.Run("err-write-protection", func(t *testing.T) { NewSmartContractTest(t, "testdata-istanbul/write-protection.json") @@ -1177,7 +1177,7 @@ func TestLondonEVM(t *testing.T) { NewSmartContractTest(t, "testdata-london/datacopy.json") }) t.Run("CVE-2021-39137-attack-replay", func(t *testing.T) { - NewSmartContractTest(t, "testdata/CVE-2021-39137-attack-replay.json") + NewSmartContractTest(t, "testdata-london/CVE-2021-39137-attack-replay.json") }) } diff --git a/action/protocol/execution/testdata-london/CVE-2021-39137-attack-replay.json b/action/protocol/execution/testdata-london/CVE-2021-39137-attack-replay.json index c2decebb1d..a4b25144a3 100644 --- a/action/protocol/execution/testdata-london/CVE-2021-39137-attack-replay.json +++ b/action/protocol/execution/testdata-london/CVE-2021-39137-attack-replay.json @@ -15,6 +15,7 @@ "rawGasLimit": 5000000, "rawGasPrice": "0", "rawExpectedGasConsumed": 16400, + "expectedStatus": 1, "expectedBalances": [], "comment": "deploy attack contract(https://etherscan.io/address/0x8eae784e072e961f76948a785b62c9a950fb17ae)" }], @@ -26,11 +27,12 @@ "rawGasPrice": "0", "rawAccessList": [], "rawExpectedGasConsumed": 12300, + "expectedStatus": 1, "comment": "launch attack(https://etherscan.io/tx/0x1cb6fb36633d270edefc04d048145b4298e67b8aa82a9e5ec4aa1435dd770ce4)", "expectedBlockInfos" : { - "txRootHash" : "a59ead74a3870e9b5ca352c5f59108df402ca203ef2109799fe2d8e1da49c83d", - "stateRootHash" : "ed9bd589ee5ab5660a3d5d863bbeea13020a0aacab18e8655a626beaf9a54713", - "receiptRootHash" : "3285579efa8521fbf95829b868ff5d37632c4feac6167e9ab2dc4961004c9272" + "txRootHash" : "977a2c16f9d3da0f22b24eab9d2dbcbdb6ae324407eb979413b51d9b2a643c4c", + "stateRootHash" : "431a30093ca6213a048ac891ee1d5d194641f5eb7736c50df20bbb587f1b4192", + "receiptRootHash" : "1c96f5d95669b5d8e63003e0ced6988c3ca6ebc64b19a6b0efc4581f3ba5b0be" } }] }