Skip to content

Commit 894adca

Browse files
wanwiset25Copilot
andauthored
fix: properly include epoch input for reward calculation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 5a0cfb7 commit 894adca

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cmd/puppeth/wizard_genesis.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ func (w *wizard) makeGenesis() {
311311
} else {
312312
yield = uint64(w.readDefaultInt(10))
313313
}
314+
if input != nil {
315+
genesis.Config.XDPoS.Epoch = input.Epoch
316+
}
314317
if rewards, ok := calcMasternodeRewards(genesis.Config.XDPoS.Period, genesis.Config.XDPoS.Epoch, threshold, yield, len(signers)); ok {
315318
fmt.Println()
316319
fmt.Println("Calculated Total Masternode rewards per epoch based on yield: ", rewards.TotalPerEpoch)

0 commit comments

Comments
 (0)