mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-25 12:45:37 +00:00
Fix a logical typo in beacon_api/validator.getStatus
This commit is contained in:
parent
d302c1d8ee
commit
7363bf3c7c
@ -113,15 +113,15 @@ proc createStatusQuery(status: openArray[string]): Result[StatusQuery, string] =
|
|||||||
|
|
||||||
proc getStatus(validator: Validator,
|
proc getStatus(validator: Validator,
|
||||||
current_epoch: Epoch): Result[string, string] =
|
current_epoch: Epoch): Result[string, string] =
|
||||||
let actual_status = if validator.activation_epoch > current_epoch:
|
if validator.activation_epoch > current_epoch:
|
||||||
# pending
|
# pending
|
||||||
if validator.activation_eligibility_epoch == FAR_FUTURE_EPOCH:
|
if validator.activation_eligibility_epoch == FAR_FUTURE_EPOCH:
|
||||||
ok("pending_initialized")
|
ok("pending_initialized")
|
||||||
else:
|
else:
|
||||||
# validator.activation_eligibility_epoch < FAR_FUTURE_EPOCH:
|
# validator.activation_eligibility_epoch < FAR_FUTURE_EPOCH:
|
||||||
ok("pending_queued")
|
ok("pending_queued")
|
||||||
elif validator.activation_epoch <= current_epoch and
|
elif (validator.activation_epoch <= current_epoch) and
|
||||||
current_epoch < validator.exit_epoch:
|
(current_epoch < validator.exit_epoch):
|
||||||
# active
|
# active
|
||||||
if validator.exit_epoch == FAR_FUTURE_EPOCH:
|
if validator.exit_epoch == FAR_FUTURE_EPOCH:
|
||||||
ok("active_ongoing")
|
ok("active_ongoing")
|
||||||
@ -131,8 +131,8 @@ proc getStatus(validator: Validator,
|
|||||||
else:
|
else:
|
||||||
# validator.exit_epoch < FAR_FUTURE_EPOCH and validator.slashed:
|
# validator.exit_epoch < FAR_FUTURE_EPOCH and validator.slashed:
|
||||||
ok("active_slashed")
|
ok("active_slashed")
|
||||||
elif validator.exit_epoch <= current_epoch and
|
elif (validator.exit_epoch <= current_epoch) and
|
||||||
current_epoch < validator.withdrawable_epoch:
|
(current_epoch < validator.withdrawable_epoch):
|
||||||
# exited
|
# exited
|
||||||
if not validator.slashed:
|
if not validator.slashed:
|
||||||
ok("exited_unslashed")
|
ok("exited_unslashed")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user