diff --git a/cluster/state/helpers.go b/cluster/state/helpers.go index bd33ad259..b2bc8964d 100644 --- a/cluster/state/helpers.go +++ b/cluster/state/helpers.go @@ -16,7 +16,7 @@ func hashRoot(hasher rootHasher) ([32]byte, error) { defer ssz.DefaultHasherPool.Put(hw) if err := hasher.HashTreeRootWith(hw); err != nil { - return [32]byte{}, err + return [32]byte{}, errors.Wrap(err, "hash tree root") } resp, err := hw.HashRoot() diff --git a/cluster/state/mutation.go b/cluster/state/mutation.go index 6b642cd8b..7d9b4c26d 100644 --- a/cluster/state/mutation.go +++ b/cluster/state/mutation.go @@ -2,8 +2,6 @@ package state -import "github.com/obolnetwork/charon/cluster" - // MutationType represents the type of a mutation. type MutationType string @@ -11,10 +9,6 @@ func (t MutationType) String() string { return string(t) } -func (t MutationType) DataType() any { - return mutationDefs[t].DataType -} - func (t MutationType) Transform(cluster Cluster, signed SignedMutation) (Cluster, error) { // TODO(corver): Verify signature @@ -29,11 +23,9 @@ const ( ) var mutationDefs = map[MutationType]struct { - DataType any TransformFunc func(Cluster, SignedMutation) (Cluster, error) }{ TypeLegacyLock: { - DataType: cluster.Lock{}, TransformFunc: transformLegacyLock, }, }