Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTransaction ¶
func ApplyTransaction(evm *evmNg.EVM, tx *types.Transaction, gp *common.GasPool) ([]byte, uint64, bool, error, types.Address)
ApplyMessage computes the new state by applying the given message against the old state within the environment. ApplyMessage returns the bytes returned by any EVM execution (if it took place), the gas used (which includes gas refunds) and an error if it failed. An error always indicates a core error meaning that the message would always fail for that particular state and would never be accepted within a block.
func GetTxsRoot ¶
func GetTxsRoot(txs []*types.Transaction) types.Hash
Types ¶
type BlockFilter ¶
type BlockFilter struct {
// contains filtered or unexported fields
}
TxFilter is an implemention of switch message filter, switch will use transaction filter to verify transaction message.
func NewBlockFilter ¶
func NewBlockFilter(eventCenter types.EventCenter, verifySignature bool) *BlockFilter
create a new block filter instance.
func (*BlockFilter) Verify ¶
func (filter *BlockFilter) Verify(portId int, msg interface{}) error
Verify verify a switch message whether is validated. return nil if message is validated, otherwise return relative error
type StateTransition ¶
type StateTransition struct {
// contains filtered or unexported fields
}
func NewStateTransition ¶
func NewStateTransition(evm *evmNg.EVM, trx *types.Transaction, gp *common.GasPool) *StateTransition
NewStateTransition initialises and returns a new state transition object.
func (*StateTransition) TransitionDb ¶
func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, failed bool, err error, contractAddr types.Address)
TransitionDb will transition the state by applying the current message and returning the result including the used gas. It returns an error if failed. An error indicates a consensus issue.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func NewWorker ¶
func NewWorker(chain *blockchain.BlockChain, block *types.Block, verifySignature bool) *Worker
func (*Worker) GetReceipts ¶
func (*Worker) VerifyBlock ¶
func (*Worker) VerifyTransaction ¶
func (*Worker) VerifyTrsSignature ¶
func (self *Worker) VerifyTrsSignature(tx *types.Transaction) bool