Skip to content

Commit

Permalink
system_tests: pass chainConfig from NodeBuilder also when creating L2…
Browse files Browse the repository at this point in the history
…-only node
  • Loading branch information
magicxyyz committed Nov 3, 2023
1 parent 3f2b7b2 commit 33c8c0f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions system_tests/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (b *NodeBuilder) Build(t *testing.T) func() {
} else {
l2 := NewTestClient(b.ctx)
b.L2Info, l2.ConsensusNode, l2.Client =
createTestNode(t, b.ctx, b.L2Info, b.nodeConfig, b.execConfig, b.takeOwnership)
createTestNode(t, b.ctx, b.L2Info, b.nodeConfig, b.execConfig, b.chainConfig, b.takeOwnership)
b.L2 = l2
}
b.L2.ExecNode = getExecNode(t, b.L2.ConsensusNode)
Expand Down Expand Up @@ -791,20 +791,23 @@ func createTestNodeWithL1(
// L2 -Only. Enough for tests that needs no interface to L1
// Requires precompiles.AllowDebugPrecompiles = true
func createTestNode(
t *testing.T, ctx context.Context, l2Info *BlockchainTestInfo, nodeConfig *arbnode.Config, execConfig *gethexec.Config, takeOwnership bool,
t *testing.T, ctx context.Context, l2Info *BlockchainTestInfo, nodeConfig *arbnode.Config, execConfig *gethexec.Config, chainConfig *params.ChainConfig, takeOwnership bool,
) (*BlockchainTestInfo, *arbnode.Node, *ethclient.Client) {
if nodeConfig == nil {
nodeConfig = arbnode.ConfigDefaultL2Test()
}
if execConfig == nil {
execConfig = gethexec.ConfigDefaultTest()
}
if chainConfig == nil {
chainConfig = params.ArbitrumDevTestChainConfig()
}

feedErrChan := make(chan error, 10)

AddDefaultValNode(t, ctx, nodeConfig, true)

l2info, stack, chainDb, arbDb, blockchain := createL2BlockChain(t, l2Info, "", params.ArbitrumDevTestChainConfig(), &execConfig.Caching)
l2info, stack, chainDb, arbDb, blockchain := createL2BlockChain(t, l2Info, "", chainConfig, &execConfig.Caching)

Require(t, execConfig.Validate())
execConfigFetcher := func() *gethexec.Config { return execConfig }
Expand Down

0 comments on commit 33c8c0f

Please sign in to comment.