mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Merge pull request #24 from sei-protocol/refactor-precheck
refactor preCheck
This commit is contained in:
commit
d6ee041f53
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