()
| 312 | } |
| 313 | |
| 314 | func newGenesisBlock() *Genesis { |
| 315 | candidates := configs.Candidates() |
| 316 | return &Genesis{ |
| 317 | Config: configs.ChainConfigInfo(), |
| 318 | Timestamp: 1492009146000, |
| 319 | ExtraData: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000"), |
| 320 | GasLimit: configs.DefaultGasLimitPerBlock, |
| 321 | Difficulty: big.NewInt(1), |
| 322 | Alloc: map[common.Address]GenesisAccount{ |
| 323 | candidates[0]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 324 | candidates[1]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 325 | candidates[2]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 326 | candidates[3]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 327 | candidates[4]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 328 | candidates[5]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 329 | |
| 330 | common.HexToAddress("0x0000000000000000000000000000000000000000"): {Balance: big.NewInt(0x00000000000000000)}, |
| 331 | common.HexToAddress("0x0000000000000000000000000000000000000001"): {Balance: big.NewInt(0x00000000000000000)}, |
| 332 | common.HexToAddress("0x0000000000000000000000000000000000000002"): {Balance: big.NewInt(0x00000000000000000)}, |
| 333 | common.HexToAddress("0x00000000000000000000000000000000000000ff"): {Balance: big.NewInt(0x00000000000000000)}, |
| 334 | common.HexToAddress("0xb3801b8743dea10c30b0c21cae8b1923d9625f84"): {Balance: new(big.Int).Mul(big.NewInt(800000000), big.NewInt(configs.Cpc))}, // contract admin account |
| 335 | }, |
| 336 | Dpor: types.DporSnap{ |
| 337 | Proposers: configs.Proposers(), |
| 338 | Seal: types.DporSignature{}, |
| 339 | Sigs: make([]types.DporSignature, configs.DefaultValidatorsNumber), |
| 340 | Validators: configs.Validators(), |
| 341 | }, |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | func newTestnetGenesisBlock() *Genesis { |
| 346 | candidates := configs.Candidates() |
no test coverage detected