2022-01-13 11:23:53 +00:00
|
|
|
package v3
|
|
|
|
|
|
|
|
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()
|
|
|
|
|
2022-02-01 00:32:39 +00:00
|
|
|
b.currentSyncCommittee = val
|
2022-01-13 11:23:53 +00:00
|
|
|
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()
|
|
|
|
|
2022-02-01 00:32:39 +00:00
|
|
|
b.nextSyncCommittee = val
|
2022-01-13 11:23:53 +00:00
|
|
|
b.markFieldAsDirty(nextSyncCommittee)
|
|
|
|
return nil
|
|
|
|
}
|