Documentation ¶
Index ¶
Constants ¶
View Source
const ( FileName = "genesis.json" InitGasLimit = 4700000 InitDifficulty = 1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SmiloChainConfig ¶
type SmiloChainConfig struct { *params.ChainConfig IsSmilo bool `json:"isSmilo,omitempty"` IsGas bool `json:"isGas,omitempty"` IsGasRefunded bool `json:"isGasRefunded,omitempty"` }
type SmiloGenesis ¶
type SmiloGenesis struct { Config *SmiloChainConfig `json:"config"` Nonce uint64 `json:"nonce"` Timestamp uint64 `json:"timestamp"` ExtraData []byte `json:"extraData"` GasLimit uint64 `json:"gasLimit" gencodec:"required"` Difficulty *big.Int `json:"difficulty" gencodec:"required"` Mixhash common.Hash `json:"mixHash"` Coinbase common.Address `json:"coinbase"` Alloc core.GenesisAlloc `json:"alloc" gencodec:"required"` // These fields are used for consensus tests. Please don't use them // in actual genesis blocks. Number uint64 `json:"number"` GasUsed uint64 `json:"gasUsed"` ParentHash common.Hash `json:"parentHash"` }
func ToSmilo ¶
func ToSmilo(g *core.Genesis, isSmilo bool) *SmiloGenesis
ToSmilo converts standard genesis to smilo genesis
func (SmiloGenesis) MarshalJSON ¶
func (s SmiloGenesis) MarshalJSON() ([]byte, error)
MarshalJSON marshals as JSON.
func (*SmiloGenesis) UnmarshalJSON ¶
func (s *SmiloGenesis) UnmarshalJSON(input []byte) error
UnmarshalJSON unmarshals from JSON.
Click to show internal directories.
Click to hide internal directories.