Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
amsanghi committed Jul 19, 2024
1 parent a13ddb6 commit 84c2fec
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
3 changes: 3 additions & 0 deletions staker/fast_confirm.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
16 changes: 0 additions & 16 deletions system_tests/fast_confirm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
16 changes: 16 additions & 0 deletions system_tests/staker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 84c2fec

Please sign in to comment.