Documentation
¶
Index ¶
- func ExplorerExecutionCallback() *block.ExecutionCallback
- type ChainGlobalConfig
- type ChainNode
- func (cn *ChainNode) EstimateGas(origin block.AddressType, code []byte) (int, error)
- func (cn *ChainNode) ExplorerGetAccountTransactions(addr block.AddressType, l int, r int) ([]ExplorerTransaction, int)
- func (cn *ChainNode) ExplorerGetBlockByHash(hash block.HashType) (*block.Block, *consensus.ConsensusState, error)
- func (cn *ChainNode) ExplorerGetTransaction(txh block.HashType) (*block.Transaction, int, error)
- func (cn *ChainNode) GetAccountInfo(addr block.AddressType) block.AccountInfo
- func (cn *ChainNode) GetBlock(height int) (*block.Block, *consensus.ConsensusState, error)
- func (cn *ChainNode) GetBlockCandidate(miner block.AddressType) *block.Block
- func (cn *ChainNode) GetContractElf(addr block.AddressType) ([]byte, error)
- func (cn *ChainNode) GetHighest() (*block.Block, *consensus.ConsensusState, error)
- func (cn *ChainNode) GetStorageAt(addr block.AddressType, pos block.HashType) storage.DataType
- func (cn *ChainNode) Run()
- func (cn *ChainNode) RunViewRawCode(origin block.AddressType, code []byte) ([]byte, error)
- func (cn *ChainNode) Stop()
- func (cn *ChainNode) SubmitBlock(b *block.Block) error
- func (cn *ChainNode) SubmitTx(tx *block.Transaction) error
- type ChainNodeConfig
- type ExplorerTransaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExplorerExecutionCallback ¶
func ExplorerExecutionCallback() *block.ExecutionCallback
Types ¶
type ChainGlobalConfig ¶
type ChainGlobalConfig struct {
ChainId uint16 `json:"chain_id"`
GenesisBlock *block.Block `json:"genesis_block"`
GenesisConsensusState *consensus.ConsensusState `json:"genesis_consensus_state"`
GenesisBlockReward uint64 `json:"genesis_block_reward"`
BlockReward uint64 `json:"block_reward"`
SeedNodes []string `json:"seed_nodes"`
Tip1EnableHeight int `json:"tip1_enable_height"`
}
type ChainNode ¶
type ChainNode struct {
// contains filtered or unexported fields
}
func NewChainNode ¶
func NewChainNode(config ChainNodeConfig, gConfig ChainGlobalConfig, execCallback *block.ExecutionCallback) (*ChainNode, error)
func (*ChainNode) EstimateGas ¶
func (*ChainNode) ExplorerGetAccountTransactions ¶
func (cn *ChainNode) ExplorerGetAccountTransactions(addr block.AddressType, l int, r int) ([]ExplorerTransaction, int)
func (*ChainNode) ExplorerGetBlockByHash ¶
func (*ChainNode) ExplorerGetTransaction ¶
func (*ChainNode) GetAccountInfo ¶
func (cn *ChainNode) GetAccountInfo(addr block.AddressType) block.AccountInfo
func (*ChainNode) GetBlockCandidate ¶
func (cn *ChainNode) GetBlockCandidate(miner block.AddressType) *block.Block
func (*ChainNode) GetContractElf ¶
func (cn *ChainNode) GetContractElf(addr block.AddressType) ([]byte, error)
func (*ChainNode) GetHighest ¶
func (*ChainNode) GetStorageAt ¶
func (*ChainNode) RunViewRawCode ¶
type ChainNodeConfig ¶
Click to show internal directories.
Click to hide internal directories.