mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-15 22:48:19 +00:00
standardize slot numbers (#2475)
This commit is contained in:
parent
9fb5bbd662
commit
94a1aca640
@ -224,7 +224,7 @@ func (vs *ValidatorServer) ValidatorStatus(
|
||||
if eth1BlockNumBigInt == nil {
|
||||
return &pb.ValidatorStatusResponse{
|
||||
Status: pb.ValidatorStatus_UNKNOWN_STATUS,
|
||||
ActivationEpoch: params.BeaconConfig().FarFutureEpoch,
|
||||
ActivationEpoch: params.BeaconConfig().FarFutureEpoch - params.BeaconConfig().GenesisEpoch,
|
||||
Eth1DepositBlockNumber: eth1BlockNumBigInt.Uint64(),
|
||||
}, nil
|
||||
}
|
||||
@ -254,7 +254,7 @@ func (vs *ValidatorServer) ValidatorStatus(
|
||||
if helpers.IsActiveValidator(val, currEpoch) {
|
||||
return &pb.ValidatorStatusResponse{
|
||||
Status: pb.ValidatorStatus_ACTIVE,
|
||||
ActivationEpoch: val.ActivationEpoch,
|
||||
ActivationEpoch: val.ActivationEpoch - params.BeaconConfig().GenesisEpoch,
|
||||
Eth1DepositBlockNumber: eth1BlockNum,
|
||||
DepositInclusionSlot: depositBlockSlot,
|
||||
}, nil
|
||||
@ -288,7 +288,7 @@ func (vs *ValidatorServer) ValidatorStatus(
|
||||
Eth1DepositBlockNumber: eth1BlockNum,
|
||||
PositionInActivationQueue: positionInQueue,
|
||||
DepositInclusionSlot: depositBlockSlot,
|
||||
ActivationEpoch: params.BeaconConfig().FarFutureEpoch,
|
||||
ActivationEpoch: params.BeaconConfig().FarFutureEpoch - params.BeaconConfig().GenesisEpoch,
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
@ -418,7 +418,7 @@ func TestValidatorStatus_Active(t *testing.T) {
|
||||
depositBlockSlot := uint64(1194)
|
||||
expected := &pb.ValidatorStatusResponse{
|
||||
Status: pb.ValidatorStatus_ACTIVE,
|
||||
ActivationEpoch: params.BeaconConfig().GenesisEpoch,
|
||||
ActivationEpoch: 0,
|
||||
DepositInclusionSlot: depositBlockSlot,
|
||||
Eth1DepositBlockNumber: 0,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user