mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 18:00:46 +00:00
commit
80ac2a9717
2 changed files with 6 additions and 6 deletions
|
|
@ -122,8 +122,8 @@ func (w *wizard) makeGenesis() {
|
||||||
genesis.Config.XDPoS.Period = uint64(w.readDefaultInt(2))
|
genesis.Config.XDPoS.Period = uint64(w.readDefaultInt(2))
|
||||||
|
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
fmt.Println("How many XDC should be rewarded to masternode? (default = 350)")
|
fmt.Println("How many XDC should be rewarded to masternode? (default = 5000)")
|
||||||
genesis.Config.XDPoS.Reward = uint64(w.readDefaultInt(350))
|
genesis.Config.XDPoS.Reward = uint64(w.readDefaultInt(5000))
|
||||||
|
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
fmt.Println("Who own the first masternodes? (mandatory)")
|
fmt.Println("Who own the first masternodes? (mandatory)")
|
||||||
|
|
@ -152,7 +152,7 @@ func (w *wizard) makeGenesis() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validatorCap := new(big.Int)
|
validatorCap := new(big.Int)
|
||||||
validatorCap.SetString("50000000000000000000000", 10)
|
validatorCap.SetString("10000000000000000000000000", 10)
|
||||||
var validatorCaps []*big.Int
|
var validatorCaps []*big.Int
|
||||||
genesis.ExtraData = make([]byte, 32+len(signers)*common.AddressLength+65)
|
genesis.ExtraData = make([]byte, 32+len(signers)*common.AddressLength+65)
|
||||||
for i, signer := range signers {
|
for i, signer := range signers {
|
||||||
|
|
@ -302,7 +302,7 @@ func (w *wizard) makeGenesis() {
|
||||||
balance.Add(balance, big.NewInt(20*1000*1000*1000))
|
balance.Add(balance, big.NewInt(20*1000*1000*1000))
|
||||||
balance.Mul(balance, big.NewInt(1000000000000000000))
|
balance.Mul(balance, big.NewInt(1000000000000000000))
|
||||||
subBalance := big.NewInt(0) // i * 50k
|
subBalance := big.NewInt(0) // i * 50k
|
||||||
subBalance.Add(subBalance, big.NewInt(int64(len(signers))*50*1000))
|
subBalance.Add(subBalance, big.NewInt(int64(len(signers))*10*1000*1000))
|
||||||
subBalance.Mul(subBalance, big.NewInt(1000000000000000000))
|
subBalance.Mul(subBalance, big.NewInt(1000000000000000000))
|
||||||
balance.Sub(balance, subBalance) // 12m - i * 50k
|
balance.Sub(balance, subBalance) // 12m - i * 50k
|
||||||
genesis.Alloc[common.HexToAddress(common.TeamAddr)] = core.GenesisAccount{
|
genesis.Alloc[common.HexToAddress(common.TeamAddr)] = core.GenesisAccount{
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,8 @@ func DeployValidator(transactOpts *bind.TransactOpts, contractBackend bind.Contr
|
||||||
// Min Voter Cap 10 XDC
|
// Min Voter Cap 10 XDC
|
||||||
// 150 masternodes
|
// 150 masternodes
|
||||||
// Candidate Delay Withdraw 30 days = 1296000 blocks
|
// Candidate Delay Withdraw 30 days = 1296000 blocks
|
||||||
// Voter Delay Withdraw 2 days = 86400 blocks
|
// Voter Delay Withdraw 10 days = 432000 blocks
|
||||||
validatorAddr, _, _, err := contract.DeployXDCValidator(transactOpts, contractBackend, validatorAddress, caps, ownerAddress, minDeposit, minVoterCap, big.NewInt(18), big.NewInt(129600), big.NewInt(43200))
|
validatorAddr, _, _, err := contract.DeployXDCValidator(transactOpts, contractBackend, validatorAddress, caps, ownerAddress, minDeposit, minVoterCap, big.NewInt(18), big.NewInt(1296000), big.NewInt(432000))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return validatorAddr, nil, err
|
return validatorAddr, nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue