|
|
|
@ -76,6 +76,7 @@ func (node *Node) SetupGenesisBlock(db ethdb.Database, shardID uint32, myShardSt |
|
|
|
|
genesisAlloc[foundationAddress] = core.GenesisAccount{Balance: genesisFunds} |
|
|
|
|
} |
|
|
|
|
case nodeconfig.Testnet: |
|
|
|
|
AddDemoAddressesToGenesisAlloc(genesisAlloc) |
|
|
|
|
fallthrough |
|
|
|
|
case nodeconfig.Devnet: |
|
|
|
|
chainConfig = *params.TestnetChainConfig |
|
|
|
@ -149,3 +150,13 @@ func AddNodeAddressesToGenesisAlloc(genesisAlloc core.GenesisAlloc) { |
|
|
|
|
genesisAlloc[address] = core.GenesisAccount{Balance: testBankFunds} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// AddDemoAddressesToGenesisAlloc funds demo addresses with free fund.
|
|
|
|
|
func AddDemoAddressesToGenesisAlloc(genesisAlloc core.GenesisAlloc) { |
|
|
|
|
for _, account := range DemoAccounts { |
|
|
|
|
testBankFunds := big.NewInt(InitFreeFund) |
|
|
|
|
testBankFunds = testBankFunds.Mul(testBankFunds, big.NewInt(params.Ether)) |
|
|
|
|
address := common.HexToAddress(account.Address) |
|
|
|
|
genesisAlloc[address] = core.GenesisAccount{Balance: testBankFunds} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|