Documentation ¶
Index ¶
- type API
- func (self *API) Close()
- func (self *API) DPOSDelayedReader(blk_n types.BlockNum) dpos.Reader
- func (self *API) DPOSReader(blk_n types.BlockNum) dpos.Reader
- func (self *API) DryRunTransaction(blk *vm.Block, trx *vm.Transaction) vm.ExecutionResult
- func (self *API) GetCommittedStateDescriptor() state_db.StateDescriptor
- func (self *API) GetStateTransition() StateTransition
- func (self *API) Init(db *state_db_rocksdb.DB, get_block_hash vm.GetHashFunc, ...) *API
- func (self *API) ReadBlock(blk_n types.BlockNum) state_db.ExtendedReader
- func (self *API) SlashingReader(blk_n types.BlockNum) slashing.Reader
- func (self *API) Trace(blk *vm.Block, trxs *[]vm.Transaction, conf *vm.TracingConfig) []byte
- func (self *API) UpdateConfig(chain_cfg *chain_config.ChainConfig)
- type APIOpts
- type StateTransition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) DPOSDelayedReader ¶
func (*API) DryRunTransaction ¶
func (self *API) DryRunTransaction(blk *vm.Block, trx *vm.Transaction) vm.ExecutionResult
func (*API) GetCommittedStateDescriptor ¶
func (self *API) GetCommittedStateDescriptor() state_db.StateDescriptor
func (*API) GetStateTransition ¶
func (self *API) GetStateTransition() StateTransition
func (*API) Init ¶
func (self *API) Init(db *state_db_rocksdb.DB, get_block_hash vm.GetHashFunc, chain_cfg *chain_config.ChainConfig, opts APIOpts) *API
func (*API) Trace ¶
func (self *API) Trace(blk *vm.Block, trxs *[]vm.Transaction, conf *vm.TracingConfig) []byte
func (*API) UpdateConfig ¶
func (self *API) UpdateConfig(chain_cfg *chain_config.ChainConfig)
type StateTransition ¶
type StateTransition interface { BeginBlock(*vm.BlockInfo) BlockNumber() types.BlockNum ExecuteTransaction(*vm.Transaction) vm.ExecutionResult AddTxFeeToBalance(account *common.Address, tx_fee *uint256.Int) GetChainConfig() *chain_config.ChainConfig GetEvmState() *state_evm.EVMState DistributeRewards(*rewards_stats.RewardsStats) *uint256.Int EndBlock() PrepareCommit() (state_root common.Hash) Commit() (state_root common.Hash) }
Click to show internal directories.
Click to hide internal directories.