updated genesis

This commit is contained in:
AnilChinchwale 2018-10-29 17:51:29 +05:30
parent 4dfbf08a6f
commit 90fc55cb91
2 changed files with 7 additions and 7 deletions

View file

@ -33,8 +33,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/fdlimit"
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/consensus/XDPoS"
"github.com/ethereum/go-ethereum/consensus/ethash"
"github.com/ethereum/go-ethereum/consensus/XDPoS"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/vm"

View file

@ -18,8 +18,8 @@ import (
const (
HexSignMethod = "e341eaa4"
RewardMasterPercent = 30
RewardVoterPercent = 60
RewardMasterPercent = 40
RewardVoterPercent = 50
RewardFoundationPercent = 10
FoudationWalletAddr = "0x0000000000000000000000000000000000000068"
)
@ -163,8 +163,8 @@ func GetCandidatesOwnerBySigner(validator *contractValidator.XDCValidator, signe
}
// Calculate reward for holders.
func CalculateRewardForHolders(validator *contractValidator.XDCValidator, state *state.StateDB, signer common.Address, calcReward *big.Int) error {
rewards, err := GetRewardBalancesRate(signer, calcReward, validator)
func CalculateRewardForHolders(foudationWalletAddr common.Address, validator *contractValidator.XDCValidator, state *state.StateDB, signer common.Address, calcReward *big.Int) error {
rewards, err := GetRewardBalancesRate(foudationWalletAddr, signer, calcReward, validator)
if err != nil {
return err
}
@ -177,7 +177,7 @@ func CalculateRewardForHolders(validator *contractValidator.XDCValidator, state
}
// Get reward balance rates for master node, founder and holders.
func GetRewardBalancesRate(masterAddr common.Address, totalReward *big.Int, validator *contractValidator.XDCValidator) (map[common.Address]*big.Int, error) {
func GetRewardBalancesRate(foudationWalletAddr common.Address, masterAddr common.Address, totalReward *big.Int, validator *contractValidator.XDCValidator) (map[common.Address]*big.Int, error) {
owner := GetCandidatesOwnerBySigner(validator, masterAddr)
balances := make(map[common.Address]*big.Int)
rewardMaster := new(big.Int).Mul(totalReward, new(big.Int).SetInt64(RewardMasterPercent))
@ -225,7 +225,7 @@ func GetRewardBalancesRate(masterAddr common.Address, totalReward *big.Int, vali
foudationReward := new(big.Int).Mul(totalReward, new(big.Int).SetInt64(RewardFoundationPercent))
foudationReward = new(big.Int).Div(foudationReward, new(big.Int).SetInt64(100))
balances[common.HexToAddress(FoudationWalletAddr)] = foudationReward
balances[foudationWalletAddr] = foudationReward
jsonHolders, err := json.Marshal(balances)
if err != nil {