From 5b13d8f3fafb82954ef6607060b9f7f99855c325 Mon Sep 17 00:00:00 2001 From: tersec Date: Mon, 3 Aug 2020 12:07:25 +0000 Subject: [PATCH] synchronize test summaries with make test (and do a few small cleanups) (#1415) --- AllTests-mainnet.md | 6 ++++-- beacon_chain/beacon_node.nim | 5 +---- beacon_chain/network_metadata.nim | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/AllTests-mainnet.md b/AllTests-mainnet.md index cf2dec9bd..9fcb84301 100644 --- a/AllTests-mainnet.md +++ b/AllTests-mainnet.md @@ -90,8 +90,10 @@ OK: 3/3 Fail: 0/3 Skip: 0/3 + Pbkdf2 decryption OK + Pbkdf2 encryption OK + Pbkdf2 errors OK ++ Scrypt decryption OK ++ Scrypt encryption OK ``` -OK: 3/3 Fail: 0/3 Skip: 0/3 +OK: 5/5 Fail: 0/5 Skip: 0/5 ## Mocking utilities ```diff + merkle_minimal OK @@ -245,4 +247,4 @@ OK: 1/1 Fail: 0/1 Skip: 0/1 OK: 1/1 Fail: 0/1 Skip: 0/1 ---TOTAL--- -OK: 134/139 Fail: 0/139 Skip: 5/139 +OK: 136/141 Fail: 0/141 Skip: 5/141 diff --git a/beacon_chain/beacon_node.nim b/beacon_chain/beacon_node.nim index 1b81ccf23..5255b6ab2 100644 --- a/beacon_chain/beacon_node.nim +++ b/beacon_chain/beacon_node.nim @@ -38,7 +38,6 @@ const type RpcServer* = RpcHttpServer - KeyPair = eth2_network.KeyPair # "state" is already taken by BeaconState BeaconNodeStatus* = enum @@ -488,7 +487,7 @@ proc onSlotStart(node: BeaconNode, lastSlot, scheduledSlot: Slot) {.gcsafe, asyn # disappear naturally - risky because user is not aware, # and might lose stake on canonical chain but "just works" # when reconnected.. - var head = node.updateHead(slot) + discard node.updateHead(slot) # TODO is the slot of the clock or the head block more interesting? provide # rationale in comment @@ -524,7 +523,6 @@ proc onSlotStart(node: BeaconNode, lastSlot, scheduledSlot: Slot) {.gcsafe, asyn proc handleMissingBlocks(node: BeaconNode) = let missingBlocks = node.quarantine.checkMissing() if missingBlocks.len > 0: - var left = missingBlocks.len info "Requesting detected missing blocks", blocks = shortLog(missingBlocks) node.requestManager.fetchAncestorBlocks(missingBlocks) @@ -640,7 +638,6 @@ proc installBeaconApiHandlers(rpcServer: RpcServer, node: BeaconNode) = rpcServer.rpc("getSyncing") do () -> bool: let - beaconTime = node.beaconClock.now() wallSlot = currentSlot(node) headSlot = node.chainDag.head.slot # FIXME: temporary hack: If more than 1 block away from expected head, then we are "syncing" diff --git a/beacon_chain/network_metadata.nim b/beacon_chain/network_metadata.nim index b186d6fb5..76596aeea 100644 --- a/beacon_chain/network_metadata.nim +++ b/beacon_chain/network_metadata.nim @@ -74,7 +74,7 @@ const presetValueLoaders = genExpr(nnkBracket): true else: `constType`(`constNameIdent`) == parse(`constType`, presetValue) - except CatchableError as err: + except CatchableError: false )