Skip to content

Commit

Permalink
Merge branch 'master' into maintenance_api
Browse files Browse the repository at this point in the history
  • Loading branch information
tsahee authored Jan 29, 2025
2 parents b7b9ed0 + df5ca16 commit 59e9514
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions staker/bold/bold_state_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ var (

var executionNodeOfflineGauge = metrics.NewRegisteredGauge("arb/state_provider/execution_node_offline", nil)

var (
ErrChainCatchingUp = errors.New("chain catching up")
)

type BOLDStateProvider struct {
validator *staker.BlockValidator
statelessValidator *staker.StatelessBlockValidator
Expand Down Expand Up @@ -171,7 +167,7 @@ func (s *BOLDStateProvider) isStateValidatedAndMessageCountPastThreshold(
return false, err
}
if lastValidatedGs == nil {
return false, ErrChainCatchingUp
return false, l2stateprovider.ErrChainCatchingUp
}
stateValidated := gs.Batch < lastValidatedGs.GlobalState.Batch || (gs.Batch == lastValidatedGs.GlobalState.Batch && gs.PosInBatch <= lastValidatedGs.GlobalState.PosInBatch)
return stateValidated, nil
Expand Down
3 changes: 3 additions & 0 deletions system_tests/bold_new_challenge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,14 @@ func fundBoldStaker(t *testing.T, ctx context.Context, builder *NodeBuilder, nam
txOpts.Value = nil

tx, err = stakeTokenWeth.Approve(&txOpts, builder.addresses.Rollup, balance)
Require(t, err)
_, err = builder.L1.EnsureTxSucceeded(tx)
Require(t, err)

challengeManager, err := rollupUserLogic.ChallengeManager(&bind.CallOpts{Context: ctx})
Require(t, err)
tx, err = stakeTokenWeth.Approve(&txOpts, challengeManager, balance)
Require(t, err)
_, err = builder.L1.EnsureTxSucceeded(tx)
Require(t, err)
}
Expand Down Expand Up @@ -335,6 +337,7 @@ func startBoldChallengeManager(t *testing.T, ctx context.Context, builder *NodeB
&txOpts,
butil.NewBackendWrapper(builder.L1.Client, rpc.LatestBlockNumber),
bold.NewDataPosterTransactor(dp),
solimpl.WithRpcHeadBlockNumber(rpc.LatestBlockNumber),
)
Require(t, err)

Expand Down

0 comments on commit 59e9514

Please sign in to comment.