diff --git a/staker/bold/bold_state_provider.go b/staker/bold/bold_state_provider.go index 48b7cbd91e..9263fcb449 100644 --- a/staker/bold/bold_state_provider.go +++ b/staker/bold/bold_state_provider.go @@ -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 @@ -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 diff --git a/system_tests/bold_new_challenge_test.go b/system_tests/bold_new_challenge_test.go index fae4a57deb..066c3dbfc4 100644 --- a/system_tests/bold_new_challenge_test.go +++ b/system_tests/bold_new_challenge_test.go @@ -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) } @@ -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)