Skip to content
Open
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
4 changes: 4 additions & 0 deletions uspv/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ func CheckHeaderChain(

// reorg is go, snip to attach height
reorgDepth := height - attachHeight
if reorgDepth > numheaders {
logging.Info("Reorg depth is greater than the number of headers received, exiting!")
return 0, fmt.Errorf("Reorg depth is greater than the number of headers received, exiting!")
}
oldHeaders = oldHeaders[:numheaders-reorgDepth]
}

Expand Down