mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
prepare testnet genesis
This commit is contained in:
parent
85584d8d00
commit
d059257895
2 changed files with 6 additions and 2 deletions
|
|
@ -213,7 +213,7 @@ func (w *wizard) makeGenesis() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Randomize Smart Contract Code
|
// Randomize Smart Contract Code
|
||||||
randomizeAddress, _, err := randomizeContract.DeployRandomize(transactOpts, contractBackend, big.NewInt(99))
|
randomizeAddress, _, err := randomizeContract.DeployRandomize(transactOpts, contractBackend, big.NewInt(90))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Can't deploy root registry")
|
fmt.Println("Can't deploy root registry")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,11 @@ func NewValidator(transactOpts *bind.TransactOpts, contractAddr common.Address,
|
||||||
func DeployValidator(transactOpts *bind.TransactOpts, contractBackend bind.ContractBackend, validatorAddress []common.Address, caps []*big.Int, ownerAddress common.Address) (common.Address, *Validator, error) {
|
func DeployValidator(transactOpts *bind.TransactOpts, contractBackend bind.ContractBackend, validatorAddress []common.Address, caps []*big.Int, ownerAddress common.Address) (common.Address, *Validator, error) {
|
||||||
minDeposit := new(big.Int)
|
minDeposit := new(big.Int)
|
||||||
minDeposit.SetString("50000000000000000000000", 10)
|
minDeposit.SetString("50000000000000000000000", 10)
|
||||||
validatorAddr, _, _, err := contract.DeployTomoValidator(transactOpts, contractBackend, validatorAddress, caps, ownerAddress, minDeposit, big.NewInt(99), big.NewInt(100), big.NewInt(100))
|
// Deposit 50K TOMO
|
||||||
|
// 150 masternodes
|
||||||
|
// Candidate Delay Withdraw 30 days = 1296000 blocks
|
||||||
|
// Voter Delay Withdraw 2 days = 8640 blocks
|
||||||
|
validatorAddr, _, _, err := contract.DeployTomoValidator(transactOpts, contractBackend, validatorAddress, caps, ownerAddress, minDeposit, big.NewInt(150), big.NewInt(8640), big.NewInt(1296000))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return validatorAddr, nil, err
|
return validatorAddr, nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue