genesis

package
v0.0.0-...-9dc3ee9 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

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
Echoin 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