NewStateTransition initialises and returns a new state transition object.
(evm *vm.EVM, msg Message, gp *GasPool)
| 112 | |
| 113 | // NewStateTransition initialises and returns a new state transition object. |
| 114 | func 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. |
no test coverage detected