mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-09 20:41:20 +00:00
8356f3a320
ssz/clonable interfaces have been moved to erigon-lib so they can be shared with the txpool code there
26 lines
566 B
Go
26 lines
566 B
Go
package state
|
|
|
|
import (
|
|
"github.com/ledgerwatch/erigon-lib/types/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())
|
|
}
|