Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
fix(prover): fix a targetDelay calculation issue (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored Jun 7, 2023
1 parent f331fc6 commit ffcfb53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prover/proof_submitter/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func sendTxWithBackoff(

targetDelay := stateVar.ProofTimeTarget * 4
if stateVar.BlockFee != 0 {
targetDelay = expectedReward / stateVar.BlockFee * stateVar.ProofTimeTarget
targetDelay = uint64(float64(expectedReward) / float64(stateVar.BlockFee) * float64(stateVar.ProofTimeTarget))
if targetDelay < stateVar.ProofTimeTarget/4 {
targetDelay = stateVar.ProofTimeTarget / 4
} else if targetDelay > stateVar.ProofTimeTarget*4 {
Expand Down

0 comments on commit ffcfb53

Please sign in to comment.