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 HanWang233 committed Sep 11, 2022
1 parent cf75a05 commit f968bb8
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
Expand Up @@ -428,7 +428,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
Expand Up @@ -662,8 +662,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 f968bb8

Please sign in to comment.