Skip to content

Commit

Permalink
Fix header sync unexpected header included
Browse files Browse the repository at this point in the history
  • Loading branch information
devfans authored Feb 11, 2022
1 parent d699ecb commit 83de12e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions relayer/poly/poly.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,10 @@ COMMIT:
case header, ok := <-ch:
if ok {
hdr = &header
if len(headers) > 0 && height != header.Height - 1 {
log.Info("Resetting header set", "chain", s.sync.ChainId, "height", height, "current_height", header.Height)
headers = [][]byte{}
}
height = header.Height
if hdr.Data == nil {
// Update header sync height
Expand Down

0 comments on commit 83de12e

Please sign in to comment.