Skip to content

Commit

Permalink
Use most recent rates before height
Browse files Browse the repository at this point in the history
  • Loading branch information
StarNeit committed Nov 30, 2020
1 parent f22a733 commit e9d445b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func (d *Pegnetd) SyncBlock(ctx context.Context, tx *sql.Tx, height uint32) erro
rates, err = d.Pegnet.SelectPendingRates(ctx, tx, height-1)
}

if rates == nil && height >= V202EnhanceActivation {
if (rates == nil || len(rates) == 0) && height >= V202EnhanceActivation {
rates, _, err = d.Pegnet.SelectMostRecentRatesBeforeHeight(ctx, tx, height)
}

Expand Down

0 comments on commit e9d445b

Please sign in to comment.