Skip to content

Commit

Permalink
fix(prover): fix a targetDelay calculation issue (taikoxyz#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Jun 7, 2023
1 parent 1e244d6 commit c51dafa
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 c51dafa

Please sign in to comment.