| 371 | } |
| 372 | |
| 373 | func newMainnetGenesisBlock() *Genesis { |
| 374 | log.Info("newMainnetGenesisBlock runmode:", "vv", configs.GetRunMode()) |
| 375 | candidates := configs.Candidates() |
| 376 | return &Genesis{ |
| 377 | Config: configs.ChainConfigInfo(), |
| 378 | Timestamp: 1553754594000, |
| 379 | ExtraData: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000"), |
| 380 | GasLimit: configs.DefaultGasLimitPerBlock, |
| 381 | Difficulty: big.NewInt(1), |
| 382 | Alloc: map[common.Address]GenesisAccount{ |
| 383 | candidates[0]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 384 | candidates[1]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 385 | candidates[2]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 386 | candidates[3]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 387 | candidates[4]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 388 | candidates[5]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 389 | |
| 390 | candidates[6]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 391 | candidates[7]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 392 | candidates[8]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 393 | candidates[9]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 394 | candidates[10]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 395 | candidates[11]: {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 396 | |
| 397 | // contract admin account 21 |
| 398 | common.HexToAddress("0x66961306fd78d39a4604167f59b25697bdad05c5"): {Balance: new(big.Int).Mul(big.NewInt(300000), big.NewInt(configs.Cpc))}, |
| 399 | // bank 22 |
| 400 | common.HexToAddress("0xfc1e61c396c6e02f0dc06bbbe5ee41a97b05b6fd"): {Balance: new(big.Int).Mul(big.NewInt(873880028800), big.NewInt(configs.Finney))}, |
| 401 | }, |
| 402 | Dpor: types.DporSnap{ |
| 403 | Proposers: configs.Proposers(), |
| 404 | Seal: types.DporSignature{}, |
| 405 | Sigs: make([]types.DporSignature, configs.MainnetValidatorsNumber), |
| 406 | Validators: configs.Validators(), |
| 407 | }, |
| 408 | } |
| 409 | } |
| 410 | |
| 411 | func newTestMainnetGenesisBlock() *Genesis { |
| 412 | log.Info("newTestMainnetGenesisBlock runmode:", "vv", configs.GetRunMode()) |