mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
21 lines
509 B
Go
21 lines
509 B
Go
package helpers
|
|
|
|
import (
|
|
"github.com/OffchainLabs/prysm/v7/beacon-chain/state"
|
|
"github.com/OffchainLabs/prysm/v7/runtime/version"
|
|
)
|
|
|
|
// DepositRequestsStarted determines if the deposit requests have started.
|
|
func DepositRequestsStarted(beaconState state.BeaconState) bool {
|
|
if beaconState.Version() < version.Electra {
|
|
return false
|
|
}
|
|
|
|
requestsStartIndex, err := beaconState.DepositRequestsStartIndex()
|
|
if err != nil {
|
|
return false
|
|
}
|
|
|
|
return beaconState.Eth1DepositIndex() == requestsStartIndex
|
|
}
|