genesis

package
v0.1.10-beta-hotfix3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2020 License: GPL-3.0 Imports: 7 Imported by: 6

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGenesisBlock

func DefaultGenesisBlock() *core.Genesis

DefaultGenesisBlock returns the Ethereum main net genesis block.

Example

ExampleDefaultGenesisBlock testing the allocate accounts count of genesis

genBlock := DefaultGenesisBlock()
allocs := genBlock.Alloc
totalAlloc := len(allocs)

totalBalance := big.NewInt(0)

for _, alloc := range allocs {
	totalBalance.Add(totalBalance, alloc.Balance)
}

fmt.Println(totalAlloc)
fmt.Println(totalBalance.String())
fmt.Println(string(genBlock.ExtraData))
Output:

22035
1000000000000000000000000000
CyberMiles for E-commerce

func DevGenesisBlock

func DevGenesisBlock() *core.Genesis

DevGenesisBlock returns the 'geth --dev' genesis block.

func SimulateGenesisBlock

func SimulateGenesisBlock() *core.Genesis

DefaultGenesisBlock returns the Ethereum main net genesis block.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL