mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-10 11:41:21 +00:00
b1c2454658
* Rename BeaconStateMerge to BeaconStateBellatrix * Rename version.Merge to version.Bellatrix * Rename ComputeFieldRootsWithHasherMerge to ComputeFieldRootsWithHasherBellatrix * Rename test names to Bellatrix * Rename comments and strings to Bellatrix * Fix formatting in a few files * Revert wrong renaming in test name * Revert renaming to Bellatrix in mainnet_config.go * Revert renaming of db key without migration * Regenerate from proto changes * Rename new use of already renamed symbols * gofmt and goimports after regenerating protofiles * revert weird imports Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
20 lines
658 B
Go
20 lines
658 B
Go
package v3
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/state/stateutil"
|
|
"github.com/prysmaticlabs/prysm/config/features"
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
|
)
|
|
|
|
// computeFieldRoots returns the hash tree root computations of every field in
|
|
// the beacon state as a list of 32 byte roots.
|
|
//nolint:deadcode
|
|
func computeFieldRoots(ctx context.Context, state *ethpb.BeaconStateBellatrix) ([][]byte, error) {
|
|
if features.Get().EnableSSZCache {
|
|
return stateutil.CachedHasher.ComputeFieldRootsWithHasherBellatrix(ctx, state)
|
|
}
|
|
return stateutil.NocachedHasher.ComputeFieldRootsWithHasherBellatrix(ctx, state)
|
|
}
|