prysm-pulse/beacon-chain/state/state-native/v2/setters_sync_committee.go
Radosław Kapka 9ee00f09a1
Native beacon state: v2 (#10121)
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2022-01-27 09:42:32 +01:00

26 lines
582 B
Go

package v2
import (
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
)
// SetCurrentSyncCommittee for the beacon state.
func (b *BeaconState) SetCurrentSyncCommittee(val *ethpb.SyncCommittee) error {
b.lock.Lock()
defer b.lock.Unlock()
b.currentSyncCommittee = val
b.markFieldAsDirty(currentSyncCommittee)
return nil
}
// SetNextSyncCommittee for the beacon state.
func (b *BeaconState) SetNextSyncCommittee(val *ethpb.SyncCommittee) error {
b.lock.Lock()
defer b.lock.Unlock()
b.nextSyncCommittee = val
b.markFieldAsDirty(nextSyncCommittee)
return nil
}