gen

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: GPL-3.0, GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGenesisBlock

func DefaultGenesisBlock() *core.Genesis

DefaultGenesisBlock returns the PalletOne main net genesis block.

func DefaultTestnetGenesisBlock

func DefaultTestnetGenesisBlock() *core.Genesis

DefaultTestnetGenesisBlock returns the Ropsten network genesis block.

func GenContractTransction

func GenContractTransction(orgTx *modules.Transaction, msgs []*modules.Message) (*modules.Transaction, error)

func GetGensisTransctions

func GetGensisTransctions(ks *keystore.KeyStore, genesis *core.Genesis) (modules.Transactions, *modules.Asset, error)

func InitialMediatorCandidates

func InitialMediatorCandidates(len int, address, pubkey string) []*core.InitialMediator

func InitialTimestamp

func InitialTimestamp(mediatorInterval uint8) int64

func SetupGenesisUnit

func SetupGenesisUnit(genesis *core.Genesis, ks *keystore.KeyStore, account accounts.Account) (*modules.Unit, error)

SetupGenesisBlock writes or updates the genesis block in db. The block that will be used is:

                     genesis == nil       genesis != nil
                  +------------------------------------------
db has no genesis |  main-net default  |  genesis
db has genesis    |  from DB           |  genesis (if compatible)

The stored chain configuration will be updated if it is compatible (i.e. does not specify a fork block below the local head block). In case of a conflict, the error is a *configure.ConfigCompatError and the new, unwritten config is returned.

The returned chain configuration is never nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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