mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
refactor preCheck
This commit is contained in:
parent
b95a71e169
commit
163124903b
1 changed files with 8 additions and 1 deletions
|
|
@ -276,7 +276,7 @@ func (st *StateTransition) initGas() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (st *StateTransition) preCheck() error {
|
||||
func (st *StateTransition) StatelessChecks() error {
|
||||
// Only check transactions that are not fake
|
||||
msg := st.msg
|
||||
if !msg.SkipAccountChecks {
|
||||
|
|
@ -351,7 +351,14 @@ func (st *StateTransition) preCheck() error {
|
|||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (st *StateTransition) preCheck() error {
|
||||
if !st.feeCharged {
|
||||
if err := st.StatelessChecks(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := st.BuyGas(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue