@@ -466,15 +466,19 @@ func saveGoalTemplateToDisk(template netdeploy.NetworkTemplate, filename string)
466466}
467467
468468func generateWalletGenesisData (wallets , npnHosts int ) gen.GenesisData {
469+ ratZero := big .NewRat (int64 (0 ), int64 (1 ))
470+ ratHundred := big .NewRat (int64 (100 ), int64 (1 ))
469471 data := gen .DefaultGenesis
470472 totalWallets := wallets + npnHosts
471473 data .Wallets = make ([]gen.WalletData , totalWallets )
472- // split participating an non participating stake evenly
473- participatingNodeStake := big .NewRat (int64 (50 ), int64 (wallets ))
474- nonParticipatingNodeStake := big .NewRat (int64 (50 ), int64 (npnHosts ))
474+ participatingNodeStake := big .NewRat (int64 (100 ), int64 (wallets ))
475+ nonParticipatingNodeStake := ratZero
476+ if npnHosts > 0 {
477+ // split participating an non participating stake evenly
478+ participatingNodeStake = big .NewRat (int64 (50 ), int64 (wallets ))
479+ nonParticipatingNodeStake = big .NewRat (int64 (50 ), int64 (npnHosts ))
480+ }
475481
476- ratZero := big .NewRat (int64 (0 ), int64 (1 ))
477- ratHundred := big .NewRat (int64 (100 ), int64 (1 ))
478482 stake := ratZero
479483 stakeSum := new (big.Rat ).Set (ratZero )
480484 for i := 0 ; i < totalWallets ; i ++ {
0 commit comments