Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: patch
---

# Fix edge case where a node incorrectly sends the genesis state to peers while syncing.
5 changes: 5 additions & 0 deletions syncer/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,11 @@ func (s *Syncer) syncLoop(ctx context.Context) error {
go func(p *Peer) {
cs, headers, remaining, err := func() (consensus.State, []types.BlockHeader, uint64, error) {
for _, id := range hist {
if id == (types.BlockID{}) {
// skip empty history entries which can occur when
// we don't have a full history of blocks.
continue
}
cs, ok := s.cm.State(id)
if !ok {
return consensus.State{}, nil, 0, errors.New("missing state for history")
Expand Down