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

Method preCheck

core/state_transition.go:171–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169}
170
171func (st *StateTransition) preCheck() error {
172 // Make sure this transaction's nonce is correct.
173 if st.msg.CheckNonce() {
174 nonce := st.state.GetNonce(st.msg.From())
175 if nonce < st.msg.Nonce() {
176 return ErrNonceTooHigh
177 } else if nonce > st.msg.Nonce() {
178 return ErrNonceTooLow
179 }
180 }
181 return st.buyGas()
182}
183
184// TransitionDb will transition the state by applying the current message and
185// returning the result including the the used gas. It returns an error if it

Callers 1

TransitionDbMethod · 0.95

Calls 5

buyGasMethod · 0.95
CheckNonceMethod · 0.65
GetNonceMethod · 0.65
FromMethod · 0.65
NonceMethod · 0.65

Tested by

no test coverage detected