2023-06-11 21:50:02 +00:00
|
|
|
package transition
|
|
|
|
|
|
|
|
import (
|
2023-07-19 22:20:33 +00:00
|
|
|
"github.com/ledgerwatch/erigon/cl/abstract"
|
2023-06-11 21:50:02 +00:00
|
|
|
"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}
|
|
|
|
|
2023-07-19 22:20:33 +00:00
|
|
|
func TransitionState(s abstract.BeaconState, block *cltypes.SignedBeaconBlock, fullValidation bool) error {
|
2023-06-11 21:50:02 +00:00
|
|
|
cvm := ð2.Impl{FullValidation: fullValidation}
|
|
|
|
return machine2.TransitionState(cvm, s, block)
|
|
|
|
}
|