MCPcopy Create free account
hub / github.com/CPChain/chain / ApplyMessage

Function ApplyMessage

core/state_transition.go:133–135  ·  view source on GitHub ↗

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 erro

(evm *vm.EVM, msg Message, gp *GasPool)

Source from the content-addressed store, hash-verified

131// indicates a core error meaning that the message would always fail for that particular
132// state and would never be accepted within a block.
133func ApplyMessage(evm *vm.EVM, msg Message, gp *GasPool) ([]byte, uint64, bool, error) {
134 return NewStateTransition(evm, msg, gp).TransitionDb()
135}
136
137// to returns the recipient of the message.
138func (st *StateTransition) to() common.Address {

Callers 2

ApplyTransactionFunction · 0.85
tryApplyPrivateTxFunction · 0.85

Calls 2

NewStateTransitionFunction · 0.85
TransitionDbMethod · 0.80

Tested by

no test coverage detected