mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-09 12:31:21 +00:00
43b09a7f55
Also added a better way to copy and the hasher
26 lines
567 B
Go
26 lines
567 B
Go
package state
|
|
|
|
import (
|
|
"github.com/ledgerwatch/erigon/cl/cltypes/clonable"
|
|
)
|
|
|
|
func (b *BeaconState) EncodeSSZ(buf []byte) ([]byte, error) {
|
|
return b.BeaconState.EncodeSSZ(buf)
|
|
}
|
|
|
|
func (b *BeaconState) DecodeSSZ(buf []byte, version int) error {
|
|
if err := b.BeaconState.DecodeSSZ(buf, version); err != nil {
|
|
return err
|
|
}
|
|
return b.initBeaconState()
|
|
}
|
|
|
|
// SSZ size of the Beacon State
|
|
func (b *BeaconState) EncodingSizeSSZ() (size int) {
|
|
return b.BeaconState.EncodingSizeSSZ()
|
|
}
|
|
|
|
func (b *BeaconState) Clone() clonable.Clonable {
|
|
return New(b.BeaconConfig())
|
|
}
|