Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Oct 19, 2023
1 parent d1dc55c commit 708dff7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion action/protocol/execution/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/mohae/deepcopy"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
"go.uber.org/zap"
Expand Down Expand Up @@ -523,7 +524,7 @@ func (sct *SmartContractTest) deployContracts(
func (sct *SmartContractTest) run(r *require.Assertions) {
// prepare blockchain
ctx := context.Background()
cfg := config.Default
cfg := deepcopy.Copy(config.Default).(config.Config)
cfg.Chain.ProducerPrivKey = identityset.PrivateKey(28).HexString()
cfg.Chain.EnableTrielessStateDB = false
bc, sf, dao, ap := sct.prepareBlockchain(ctx, cfg, r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"expectedStatus": 1,
"comment": "launch attack(https://etherscan.io/tx/0x1cb6fb36633d270edefc04d048145b4298e67b8aa82a9e5ec4aa1435dd770ce4)",
"expectedBlockInfos" : {
"txRootHash" : "2fe919aaaf4bd8cb41c30b6c076c3f63401b8f4e97d10c094cd5d780c1b9bd8a",
"txRootHash" : "977a2c16f9d3da0f22b24eab9d2dbcbdb6ae324407eb979413b51d9b2a643c4c",
"stateRootHash" : "431a30093ca6213a048ac891ee1d5d194641f5eb7736c50df20bbb587f1b4192",
"receiptRootHash" : "a957881177b1e3c04bd4cbda648e06eb628497dd0fc55ab118b307875ba8bde3"
"receiptRootHash" : "1c96f5d95669b5d8e63003e0ced6988c3ca6ebc64b19a6b0efc4581f3ba5b0be"
}
}]
}
2 changes: 1 addition & 1 deletion action/protocol/execution/testdata-paris/prevrandao.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"rawAccessList": [],
"rawExpectedGasConsumed": 10714,
"expectedStatus": 1,
"rawReturnValue": "1db9e495b0a12df1e4d113cacd853df98fc3da9dba89959e8210728f9b78c917",
"rawReturnValue": "ece3d442a20e753172e11c7836c0cf9a19c79ece44c239d6f8dfa38c2c41eb0d",
"comment": "call random()",
"readOnly": true
}]
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ require (
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.0.3 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
Expand Down

0 comments on commit 708dff7

Please sign in to comment.