Skip to content

Commit

Permalink
vsp: Calculate blocksUntilLive properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
jholdstock committed Jul 20, 2023
1 parent 91c9697 commit 39eb415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/vsp/feepayment.go
Expand Up @@ -333,7 +333,7 @@ func (fp *feePayment) next() time.Duration {
var jitter time.Duration
switch {
case tipHeight < ticketLive: // immature, mined ticket
blocksUntilLive := ticketExpires - tipHeight
blocksUntilLive := ticketLive - tipHeight
jitter = fp.params.TargetTimePerBlock * time.Duration(blocksUntilLive)
if jitter > immatureJitter {
jitter = immatureJitter
Expand Down

0 comments on commit 39eb415

Please sign in to comment.