Skip to content

Commit

Permalink
eth/catalyst: return syncing not accepted (ethereum#25414)
Browse files Browse the repository at this point in the history
* eth/catalyst: return syncing not accepted

* eth/catalyst: fix test
  • Loading branch information
MariusVanDerWijden authored and cp-wjhan committed Oct 6, 2023
1 parent 65cb8df commit 702cb08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eth/catalyst/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ func (api *ConsensusAPI) delayPayloadImport(block *types.Block) (beacon.PayloadS
// and cannot afford concurrent out-if-band modifications via imports.
log.Warn("Ignoring payload while snap syncing", "number", block.NumberU64(), "hash", block.Hash())
}
return beacon.PayloadStatusV1{Status: beacon.ACCEPTED}, nil
return beacon.PayloadStatusV1{Status: beacon.SYNCING}, nil
}

// setInvalidAncestor is a callback for the downloader to notify us if a bad block
Expand Down
4 changes: 2 additions & 2 deletions eth/catalyst/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,8 @@ func TestEmptyBlocks(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if status.Status != beacon.ACCEPTED {
t.Errorf("invalid status: expected ACCEPTED got: %v", status.Status)
if status.Status != beacon.SYNCING {
t.Errorf("invalid status: expected SYNCING got: %v", status.Status)
}
if status.LatestValidHash != nil {
t.Fatalf("invalid LVH: got %v wanted nil", status.LatestValidHash)
Expand Down

0 comments on commit 702cb08

Please sign in to comment.