From af62a0c2fa399ce7d22356fd993826295f64271e Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Thu, 20 May 2021 12:00:57 +0300 Subject: [PATCH] chore: remove extra sighash params --- l2geth/core/rawdb/accessors_indexes_test.go | 6 +++--- l2geth/les/odr_test.go | 4 ++-- l2geth/light/odr_test.go | 2 +- l2geth/rollup/sync_service_test.go | 3 --- l2geth/tests/state_test_util.go | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/l2geth/core/rawdb/accessors_indexes_test.go b/l2geth/core/rawdb/accessors_indexes_test.go index f980bcf20976..74b3f08a71b8 100644 --- a/l2geth/core/rawdb/accessors_indexes_test.go +++ b/l2geth/core/rawdb/accessors_indexes_test.go @@ -73,15 +73,15 @@ func TestLookupStorage(t *testing.T) { l1BlockNumber2 := big.NewInt(2) tx1 := types.NewTransaction(1, common.BytesToAddress([]byte{0x11}), big.NewInt(111), 1111, big.NewInt(11111), []byte{0x11, 0x11, 0x11}) - tx1Meta := types.NewTransactionMeta(l1BlockNumber1, 0, &sender1, types.SighashEIP155, types.QueueOriginSequencer, nil, nil, nil) + tx1Meta := types.NewTransactionMeta(l1BlockNumber1, 0, &sender1, types.QueueOriginSequencer, nil, nil, nil) tx1.SetTransactionMeta(tx1Meta) tx2 := types.NewTransaction(2, common.BytesToAddress([]byte{0x22}), big.NewInt(222), 2222, big.NewInt(22222), []byte{0x22, 0x22, 0x22}) - tx2Meta := types.NewTransactionMeta(l1BlockNumber2, 0, &sender2, types.SighashEIP155, types.QueueOriginSequencer, nil, nil, nil) + tx2Meta := types.NewTransactionMeta(l1BlockNumber2, 0, &sender2, types.QueueOriginSequencer, nil, nil, nil) tx2.SetTransactionMeta(tx2Meta) tx3 := types.NewTransaction(3, common.BytesToAddress([]byte{0x33}), big.NewInt(333), 3333, big.NewInt(33333), []byte{0x33, 0x33, 0x33}) - tx3Meta := types.NewTransactionMeta(l1BlockNumber1, 0, nil, types.SighashEIP155, types.QueueOriginSequencer, nil, nil, nil) + tx3Meta := types.NewTransactionMeta(l1BlockNumber1, 0, nil, types.QueueOriginSequencer, nil, nil, nil) tx3.SetTransactionMeta(tx3Meta) txs := []*types.Transaction{tx1, tx2, tx3} diff --git a/l2geth/les/odr_test.go b/l2geth/les/odr_test.go index c1004326d093..42df067ac92e 100644 --- a/l2geth/les/odr_test.go +++ b/l2geth/les/odr_test.go @@ -128,7 +128,7 @@ func odrContractCall(ctx context.Context, db ethdb.Database, config *params.Chai from := statedb.GetOrNewStateObject(bankAddr) from.SetBalance(math.MaxBig256) - msg := callmsg{types.NewMessage(from.Address(), &testContractAddr, 0, new(big.Int), 100000, new(big.Int), data, false, nil, nil, types.QueueOriginSequencer, 0)} + msg := callmsg{types.NewMessage(from.Address(), &testContractAddr, 0, new(big.Int), 100000, new(big.Int), data, false, nil, nil, types.QueueOriginSequencer)} context := core.NewEVMContext(msg, header, bc, nil) vmenv := vm.NewEVM(context, statedb, config, vm.Config{}) @@ -142,7 +142,7 @@ func odrContractCall(ctx context.Context, db ethdb.Database, config *params.Chai header := lc.GetHeaderByHash(bhash) state := light.NewState(ctx, header, lc.Odr()) state.SetBalance(bankAddr, math.MaxBig256) - msg := callmsg{types.NewMessage(bankAddr, &testContractAddr, 0, new(big.Int), 100000, new(big.Int), data, false, nil, nil, types.QueueOriginSequencer, 0)} + msg := callmsg{types.NewMessage(bankAddr, &testContractAddr, 0, new(big.Int), 100000, new(big.Int), data, false, nil, nil, types.QueueOriginSequencer)} context := core.NewEVMContext(msg, header, lc, nil) vmenv := vm.NewEVM(context, state, config, vm.Config{}) gp := new(core.GasPool).AddGas(math.MaxUint64) diff --git a/l2geth/light/odr_test.go b/l2geth/light/odr_test.go index 387f705b0315..70873e74f9e2 100644 --- a/l2geth/light/odr_test.go +++ b/l2geth/light/odr_test.go @@ -194,7 +194,7 @@ func odrContractCall(ctx context.Context, db ethdb.Database, bc *core.BlockChain // Perform read-only call. st.SetBalance(testBankAddress, math.MaxBig256) - msg := callmsg{types.NewMessage(testBankAddress, &testContractAddr, 0, new(big.Int), 1000000, new(big.Int), data, false, nil, nil, types.QueueOriginSequencer, 0)} + msg := callmsg{types.NewMessage(testBankAddress, &testContractAddr, 0, new(big.Int), 1000000, new(big.Int), data, false, nil, nil, types.QueueOriginSequencer)} context := core.NewEVMContext(msg, header, chain, nil) vmenv := vm.NewEVM(context, st, config, vm.Config{}) gp := new(core.GasPool).AddGas(math.MaxUint64) diff --git a/l2geth/rollup/sync_service_test.go b/l2geth/rollup/sync_service_test.go index f5e2ea175bfa..3f55f7d2b68a 100644 --- a/l2geth/rollup/sync_service_test.go +++ b/l2geth/rollup/sync_service_test.go @@ -118,7 +118,6 @@ func TestSyncServiceTransactionEnqueued(t *testing.T) { l1BlockNumber, timestamp, &l1TxOrigin, - types.SighashEIP155, types.QueueOriginL1ToL2, &index, &queueIndex, @@ -203,7 +202,6 @@ func TestSyncServiceSync(t *testing.T) { l1BlockNumber, timestamp, &l1TxOrigin, - types.SighashEIP155, types.QueueOriginL1ToL2, &index, &queueIndex, @@ -252,7 +250,6 @@ func TestInitializeL1ContextPostGenesis(t *testing.T) { l1BlockNumber, timestamp, &l1TxOrigin, - types.SighashEIP155, types.QueueOriginL1ToL2, &index, &queueIndex, diff --git a/l2geth/tests/state_test_util.go b/l2geth/tests/state_test_util.go index fd1e679ae44d..26e6607ef241 100644 --- a/l2geth/tests/state_test_util.go +++ b/l2geth/tests/state_test_util.go @@ -279,7 +279,7 @@ func (tx *stTransaction) toMessage(ps stPostState) (core.Message, error) { return nil, fmt.Errorf("invalid tx data %q", dataHex) } - msg := types.NewMessage(from, to, tx.Nonce, value, gasLimit, tx.GasPrice, data, true, nil, nil, types.QueueOriginSequencer, 0) + msg := types.NewMessage(from, to, tx.Nonce, value, gasLimit, tx.GasPrice, data, true, nil, nil, types.QueueOriginSequencer) return msg, nil }