GenesisBlockForTesting creates and writes a block in which addr has the given wei balance.
(db database.Database, addr common.Address, balance *big.Int)
| 285 | |
| 286 | // GenesisBlockForTesting creates and writes a block in which addr has the given wei balance. |
| 287 | func GenesisBlockForTesting(db database.Database, addr common.Address, balance *big.Int) *types.Block { |
| 288 | g := DefaultGenesisBlock() |
| 289 | g.Alloc = GenesisAlloc{addr: {Balance: balance}} |
| 290 | return g.MustCommit(db) |
| 291 | } |
| 292 | |
| 293 | // Genesis hashes to enforce below configs on. |
| 294 | var MainnetGenesisHash = common.HexToHash("0xf70bf47d2629b1e9e9f900b0eb3b73e7e93c31b330d04c0029557d2ad065282a") |