mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
3ab373787e
we need to extract this interface from the struct. i need to also break down the interface more, to better show what parts the caching is used, move some functions from the cache state to the underlying. don't merge
20 lines
590 B
Go
20 lines
590 B
Go
package transition
|
|
|
|
import (
|
|
"github.com/ledgerwatch/erigon/cl/abstract"
|
|
"github.com/ledgerwatch/erigon/cl/transition/impl/eth2"
|
|
machine2 "github.com/ledgerwatch/erigon/cl/transition/machine"
|
|
|
|
"github.com/ledgerwatch/erigon/cl/cltypes"
|
|
)
|
|
|
|
var _ machine2.Interface = (*eth2.Impl)(nil)
|
|
|
|
var DefaultMachine = ð2.Impl{}
|
|
var ValidatingMachine = ð2.Impl{FullValidation: true}
|
|
|
|
func TransitionState(s abstract.BeaconState, block *cltypes.SignedBeaconBlock, fullValidation bool) error {
|
|
cvm := ð2.Impl{FullValidation: fullValidation}
|
|
return machine2.TransitionState(cvm, s, block)
|
|
}
|