Documentation
¶
Index ¶
- Constants
- func ApplyBlock(b Block, s *State) error
- func ExpandPath(p string) string
- func GetEncryptionKeysFilePath(datadir string) string
- func GetKeystoreDirPath(datadir string) string
- func IsBlockHashValid(hash Hash) bool
- func NewAddress(value string) common.Address
- func RemoveDir(path string) error
- func Rename(originalPath string, destinationPath string) error
- func Unicode(s string) string
- func WriteEncryptionKeys(datadir string, key keystore.CryptoJSON) error
- type Block
- type BlockFS
- type BlockHeader
- type CurrentNodeState
- type Genesis
- type Hash
- type SignedTx
- type State
- type Tx
Constants ¶
View Source
const BlockReward = float32(10)
Variables ¶
This section is empty.
Functions ¶
func ApplyBlock ¶
func ExpandPath ¶
func GetKeystoreDirPath ¶
func NewAddress ¶
func WriteEncryptionKeys ¶
func WriteEncryptionKeys(datadir string, key keystore.CryptoJSON) error
Types ¶
type Block ¶
type Block struct { Header BlockHeader TXs []SignedTx }
func GetBlocksAfter ¶
Get all blocks in 'datadir' whose parent is a child of the block with the given block hash
type BlockHeader ¶
type CurrentNodeState ¶
type Genesis ¶
type Genesis struct {
State map[common.Address]CurrentNodeState `json:"state"`
}
type State ¶
type State struct { Subscriptions map[string]chan core.MessageTransport Catalog map[common.Address]CurrentNodeState Account2Nonce map[common.Address]uint PendingAccount2Nonce map[common.Address]uint // contains filtered or unexported fields }
func NewStateFromDisk ¶
* Loads the current state by replaying all transactions in block.db * on top of the genesis state as defined in genesis.json
func (*State) LatestBlock ¶
* Get the latest block from the current state
func (*State) LatestBlockHash ¶
* Get the latest block hash from the current state
func (*State) NextBlockNumber ¶
Click to show internal directories.
Click to hide internal directories.