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

Function NewStateTransition

core/state_transition.go:114–124  ·  view source on GitHub ↗

NewStateTransition initialises and returns a new state transition object.

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

Source from the content-addressed store, hash-verified

112
113// NewStateTransition initialises and returns a new state transition object.
114func NewStateTransition(evm *vm.EVM, msg Message, gp *GasPool) *StateTransition {
115 return &StateTransition{
116 gp: gp,
117 evm: evm,
118 msg: msg,
119 gasPrice: msg.GasPrice(),
120 value: msg.Value(),
121 data: msg.Data(),
122 state: evm.StateDB,
123 }
124}
125
126// ApplyMessage computes the new state by applying the given message
127// against the old state within the environment.

Callers 1

ApplyMessageFunction · 0.85

Calls 3

GasPriceMethod · 0.65
ValueMethod · 0.65
DataMethod · 0.65

Tested by

no test coverage detected