Skip to content

Commit 4813709

Browse files
committed
system_test: more uses for RequireScheme
1 parent 2ef199b commit 4813709

File tree

9 files changed

+3
-15
lines changed

9 files changed

+3
-15
lines changed

system_tests/gas_dim_tx_op_precompiles_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package arbtest
33
import (
44
"testing"
55

6-
"github.com/ethereum/go-ethereum/core/rawdb"
76
"github.com/ethereum/go-ethereum/core/types"
87
"github.com/ethereum/go-ethereum/params"
98

@@ -89,7 +88,6 @@ func gasDimPrecompileBuilderOpts() []func(*NodeBuilder) {
8988
builderOpts := func(builder *NodeBuilder) {
9089
// Match gasDimensionTestSetup settings
9190
builder.execConfig.Caching.Archive = true
92-
builder.execConfig.Caching.StateScheme = rawdb.HashScheme
9391
builder.execConfig.Sequencer.MaxRevertGasReject = 0
9492
builder.WithArbOSVersion(params.MaxArbosVersionSupported)
9593
}

system_tests/pruning_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ func testPruning(t *testing.T, mode string, pruneParallelStorageTraversal bool)
4848
// PathScheme prunes the state trie by itself, so only HashScheme should be tested
4949
builder.RequireScheme(t, rawdb.HashScheme)
5050

51-
builder.execConfig.Caching.StateScheme = rawdb.HashScheme
5251
_ = builder.Build(t)
5352
l2cleanupDone := false
5453
defer func() {

system_tests/recreatestate_rpc_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,6 @@ func TestStateAndHeaderForRecentBlock(t *testing.T) {
565565
defer cancel()
566566
builder := NewNodeBuilder(ctx).DefaultConfig(t, true)
567567
builder.execConfig.Caching.Archive = true
568-
// For now Archive node should use HashScheme
569-
builder.execConfig.Caching.StateScheme = rawdb.HashScheme
570568
builder.execConfig.RPC.MaxRecreateStateDepth = 0
571569
cleanup := builder.Build(t)
572570
defer cleanup()

system_tests/retryable_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func retryableSetup(t *testing.T, modifyNodeConfig ...func(*NodeBuilder)) (
5656

5757
// retryableSetup is being called by tests that validate blocks.
5858
// For now validation only works with HashScheme set.
59-
builder.execConfig.Caching.StateScheme = rawdb.HashScheme
59+
builder.RequireScheme(t, rawdb.HashScheme)
6060
builder.nodeConfig.BlockValidator.Enable = false
6161
builder.nodeConfig.Staker.Enable = true
6262
builder.nodeConfig.BatchPoster.Enable = true

system_tests/revalidation_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"testing"
77
"time"
88

9-
"github.com/ethereum/go-ethereum/core/rawdb"
109
"github.com/ethereum/go-ethereum/core/types"
1110
"github.com/ethereum/go-ethereum/params"
1211

@@ -24,7 +23,6 @@ func TestRevalidationForSpecifiedRange(t *testing.T) {
2423

2524
// 1st node with sequencer, stays up all the time.
2625
builder := NewNodeBuilder(ctx).DefaultConfig(t, true).DontParalellise()
27-
builder.execConfig.Caching.StateScheme = rawdb.HashScheme
2826
builder.nodeConfig.BlockValidator.Enable = true
2927
builder.L2Info = NewBlockChainTestInfo(
3028
t,

system_tests/staker_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func stakerTestImpl(t *testing.T, faultyStaker bool, honestStakerInactive bool)
8282
)
8383

8484
// For now validation only works with HashScheme set
85-
builder.execConfig.Caching.StateScheme = rawdb.HashScheme
85+
builder.RequireScheme(t, rawdb.HashScheme)
8686

8787
builder.nodeConfig.BatchPoster.MaxDelay = -1000 * time.Hour
8888
cleanupA := builder.Build(t)

system_tests/staterecovery_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ func TestRectreateMissingStates(t *testing.T) {
2121
defer cancel()
2222
builder := NewNodeBuilder(ctx).DefaultConfig(t, true)
2323
builder.execConfig.Caching.Archive = true
24-
// For now Archive node should use HashScheme
25-
builder.execConfig.Caching.StateScheme = rawdb.HashScheme
2624
builder.execConfig.Caching.MaxNumberOfBlocksToSkipStateSaving = 16
2725
builder.execConfig.Caching.SnapshotCache = 0 // disable snapshots
2826
_ = builder.Build(t)

system_tests/storage_trie_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func TestStorageTrie(t *testing.T) {
2525

2626
// This test tests validates blocks at the end.
2727
// For now, validation only works with HashScheme set.
28-
builder.execConfig.Caching.StateScheme = rawdb.HashScheme
28+
builder.RequireScheme(t, rawdb.HashScheme)
2929
builder.nodeConfig.BlockValidator.Enable = false
3030
builder.nodeConfig.Staker.Enable = true
3131
builder.nodeConfig.BatchPoster.Enable = true

system_tests/triedb_race_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88

99
"github.com/ethereum/go-ethereum/arbitrum"
1010
"github.com/ethereum/go-ethereum/common"
11-
"github.com/ethereum/go-ethereum/core/rawdb"
1211
"github.com/ethereum/go-ethereum/log"
1312
"github.com/ethereum/go-ethereum/rpc"
1413

@@ -25,8 +24,6 @@ func TestTrieDBCommitRace(t *testing.T) {
2524
builder.execConfig.Sequencer.MaxBlockSpeed = 0
2625
builder.execConfig.Sequencer.MaxTxDataSize = 150 // 1 test tx ~= 110
2726
builder.execConfig.Caching.Archive = true
28-
// For now Archive node should use HashScheme
29-
builder.execConfig.Caching.StateScheme = rawdb.HashScheme
3027
builder.execConfig.Caching.BlockCount = 127
3128
builder.execConfig.Caching.BlockAge = 0
3229
builder.execConfig.Caching.MaxNumberOfBlocksToSkipStateSaving = 127

0 commit comments

Comments
 (0)