fix Nim 1.6 deprecation and unused import warnings (#3834)
This commit is contained in:
parent
6a3bd89d09
commit
ba4d4c14db
|
@ -47,9 +47,10 @@ OK: 16/16 Fail: 0/16 Skip: 0/16
|
|||
+ dependent_root OK
|
||||
+ get_beacon_proposer_index OK
|
||||
+ latest_block_root OK
|
||||
+ merklizer state roundtrip OK
|
||||
+ process_slots OK
|
||||
```
|
||||
OK: 5/5 Fail: 0/5 Skip: 0/5
|
||||
OK: 6/6 Fail: 0/6 Skip: 0/6
|
||||
## Beacon time
|
||||
```diff
|
||||
+ basics OK
|
||||
|
@ -568,4 +569,4 @@ OK: 1/1 Fail: 0/1 Skip: 0/1
|
|||
OK: 9/9 Fail: 0/9 Skip: 0/9
|
||||
|
||||
---TOTAL---
|
||||
OK: 313/318 Fail: 0/318 Skip: 5/318
|
||||
OK: 314/319 Fail: 0/319 Skip: 5/319
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
# protocol. See https://github.com/ethereum/consensus-specs/pull/2802
|
||||
|
||||
import
|
||||
# Status libraries
|
||||
stew/bitops2,
|
||||
# Beacon chain internals
|
||||
../spec/datatypes/altair,
|
||||
../light_client_data_db,
|
||||
|
|
|
@ -198,18 +198,18 @@ proc installKeymanagerHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||
if res.isOk:
|
||||
case res.value()
|
||||
of RemoveValidatorStatus.deleted:
|
||||
keysAndDeleteStatus.add(
|
||||
pubkey, RequestItemStatus(status: $KeystoreStatus.deleted))
|
||||
keysAndDeleteStatus[pubkey] =
|
||||
RequestItemStatus(status: $KeystoreStatus.deleted)
|
||||
|
||||
# At first all keys with status missing directory after removal receive
|
||||
# status 'not_found'
|
||||
of RemoveValidatorStatus.notFound:
|
||||
keysAndDeleteStatus.add(
|
||||
pubkey, RequestItemStatus(status: $KeystoreStatus.notFound))
|
||||
keysAndDeleteStatus[pubkey] =
|
||||
RequestItemStatus(status: $KeystoreStatus.notFound)
|
||||
else:
|
||||
keysAndDeleteStatus.add(pubkey,
|
||||
keysAndDeleteStatus[pubkey] =
|
||||
RequestItemStatus(status: $KeystoreStatus.error,
|
||||
message: $res.error()))
|
||||
message: $res.error())
|
||||
|
||||
# If we discover slashing protection data for a validator that was not
|
||||
# found, this means the validator was active in the past, so we must
|
||||
|
|
|
@ -151,11 +151,11 @@ proc addValidators*(node: BeaconNode) =
|
|||
node.addLocalValidators(localValidators)
|
||||
node.addRemoteValidators(remoteValidators)
|
||||
|
||||
proc getAttachedValidator*(node: BeaconNode,
|
||||
proc getAttachedValidator(node: BeaconNode,
|
||||
pubkey: ValidatorPubKey): AttachedValidator =
|
||||
node.attachedValidators[].getValidator(pubkey)
|
||||
|
||||
proc getAttachedValidator*(node: BeaconNode,
|
||||
proc getAttachedValidator(node: BeaconNode,
|
||||
state_validators: auto,
|
||||
idx: ValidatorIndex): AttachedValidator =
|
||||
if uint64(idx) < state_validators.lenu64:
|
||||
|
@ -170,7 +170,7 @@ proc getAttachedValidator*(node: BeaconNode,
|
|||
idx, validators = state_validators.len
|
||||
nil
|
||||
|
||||
proc getAttachedValidator*(node: BeaconNode,
|
||||
proc getAttachedValidator(node: BeaconNode,
|
||||
epochRef: EpochRef,
|
||||
idx: ValidatorIndex): AttachedValidator =
|
||||
let key = epochRef.validatorKey(idx)
|
||||
|
|
Loading…
Reference in New Issue