mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
17 lines
435 B
Go
17 lines
435 B
Go
package v3
|
|
|
|
import ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
|
|
|
// SetLatestExecutionPayloadHeader for the beacon state.
|
|
func (b *BeaconState) SetLatestExecutionPayloadHeader(val *ethpb.ExecutionPayloadHeader) error {
|
|
if !b.hasInnerState() {
|
|
return ErrNilInnerState
|
|
}
|
|
b.lock.Lock()
|
|
defer b.lock.Unlock()
|
|
|
|
b.state.LatestExecutionPayloadHeader = val
|
|
b.markFieldAsDirty(latestExecutionPayloadHeader)
|
|
return nil
|
|
}
|