From 84c2fec9a6e08c7a7427b28cdab93298174a68cd Mon Sep 17 00:00:00 2001 From: Aman Sanghi Date: Fri, 19 Jul 2024 22:07:17 +0530 Subject: [PATCH] fix --- staker/fast_confirm.go | 3 +++ system_tests/fast_confirm_test.go | 16 ---------------- system_tests/staker_test.go | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/staker/fast_confirm.go b/staker/fast_confirm.go index 1f0e775d94..22e4c84350 100644 --- a/staker/fast_confirm.go +++ b/staker/fast_confirm.go @@ -1,3 +1,6 @@ +// Copyright 2023-2024, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro/blob/master/LICENSE + package staker import ( diff --git a/system_tests/fast_confirm_test.go b/system_tests/fast_confirm_test.go index 3719d5422c..d780f80414 100644 --- a/system_tests/fast_confirm_test.go +++ b/system_tests/fast_confirm_test.go @@ -511,19 +511,3 @@ func deploySafe(t *testing.T, l1 *TestClient, backend bind.ContractBackend, depl Require(t, err) return safeProxyAddress } - -func makeBackgroundTxs(ctx context.Context, builder *NodeBuilder) error { - for i := uint64(0); ctx.Err() == nil; i++ { - builder.L2Info.Accounts["BackgroundUser"].Nonce.Store(i) - tx := builder.L2Info.PrepareTx("BackgroundUser", "BackgroundUser", builder.L2Info.TransferGas, common.Big0, nil) - err := builder.L2.Client.SendTransaction(ctx, tx) - if err != nil { - return err - } - _, err = builder.L2.EnsureTxSucceeded(tx) - if err != nil { - return err - } - } - return nil -} diff --git a/system_tests/staker_test.go b/system_tests/staker_test.go index 3eb5c2891c..52f16614f7 100644 --- a/system_tests/staker_test.go +++ b/system_tests/staker_test.go @@ -40,6 +40,22 @@ import ( "github.com/offchainlabs/nitro/validator/valnode" ) +func makeBackgroundTxs(ctx context.Context, builder *NodeBuilder) error { + for i := uint64(0); ctx.Err() == nil; i++ { + builder.L2Info.Accounts["BackgroundUser"].Nonce.Store(i) + tx := builder.L2Info.PrepareTx("BackgroundUser", "BackgroundUser", builder.L2Info.TransferGas, common.Big0, nil) + err := builder.L2.Client.SendTransaction(ctx, tx) + if err != nil { + return err + } + _, err = builder.L2.EnsureTxSucceeded(tx) + if err != nil { + return err + } + } + return nil +} + func stakerTestImpl(t *testing.T, faultyStaker bool, honestStakerInactive bool) { t.Parallel() ctx, cancelCtx := context.WithCancel(context.Background())