Skip to content

Commit

Permalink
UPD(block): add height to fetch isSynced condition
Browse files Browse the repository at this point in the history
  • Loading branch information
soooooot committed Nov 1, 2018
1 parent d51aa54 commit 3a8000e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/stream/block/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func (b *BlockFetcher) handle(blocks []*lws.Block) error {
if err != nil {
log.Printf("handle sync block error [%s]", err)
}
if bytes.Compare(block.Hash, b.TriggerBlock.Hash) == 0 {
if bytes.Compare(block.Hash, b.TriggerBlock.Hash) == 0 || block.NHeight > b.TriggerBlock.NHeight {
b.isTriggerBlockSynced = true
}
}
Expand Down

0 comments on commit 3a8000e

Please sign in to comment.