rm unused imports and fix stylecheck issues (#3784)

This commit is contained in:
tersec 2022-06-21 19:01:45 +00:00 committed by GitHub
parent 8d3afd8285
commit 56cd6e2b45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 10 deletions

View File

@ -407,7 +407,8 @@ template awaitWithRetries*[T](lazyFutExpr: Future[T],
if not f.finished:
await cancelAndWait(f)
elif f.failed:
static: doAssert f.error of CatchableError
when not (f.error of CatchableError):
static: doAssert false, "f.error not CatchableError"
debug "Web3 request failed", req = reqType, err = f.error.msg
inc failed_web3_requests
else:

View File

@ -6,7 +6,6 @@
import stew/[byteutils, base10], chronicles
import ".."/beacon_node,
".."/eth1/eth1_monitor,
".."/spec/forks,
"."/rest_utils
from ../fork_choice/proto_array import PROPOSER_SCORE_BOOST

View File

@ -7,7 +7,7 @@
import std/sequtils
import chronicles
import ".."/[version, beacon_node],
import ".."/beacon_node,
".."/spec/forks,
"."/[rest_utils, state_ttl_cache]

View File

@ -8,7 +8,7 @@ import std/[tables, os, strutils, uri]
import chronos, chronicles, confutils,
stew/[base10, results, io2], blscurve
import ".."/validators/slashing_protection
import ".."/[conf, version, filepath, beacon_node]
import ".."/[conf, filepath, beacon_node]
import ".."/spec/[keystore, crypto]
import ".."/rpc/rest_utils
import ".."/validators/[keystore_management, validator_pool, validator_duties]

View File

@ -145,7 +145,7 @@ proc readValue*(reader: var JsonReader[RestJson],
for e in reader.readArray(string):
let parsed = try:
parseBiggestUint(e)
parseBiggestUInt(e)
except ValueError as err:
reader.raiseUnexpectedValue("A string-encoded 8-bit usigned integer value expected")

View File

@ -7,7 +7,7 @@
{.push raises: [Defect].}
import
stew/[assign2, base10],
stew/base10,
chronicles, chronos,
./sync/sync_manager,
./consensus_object_pools/blockchain_dag,

View File

@ -16,10 +16,10 @@ import
std/[os, sequtils, tables],
# Nimble packages
stew/[assign2, byteutils, objects],
stew/[byteutils, objects],
chronos, metrics,
chronicles, chronicles/timings,
json_serialization/std/[options, sets, net], serialization/errors,
json_serialization/std/[options, sets, net],
eth/db/kvstore,
eth/keys, eth/p2p/discoveryv5/[protocol, enr],
web3/ethtypes,
@ -36,7 +36,7 @@ import
../networking/eth2_network,
../sszdump, ../sync/sync_manager,
../gossip_processing/[block_processor, consensus_manager],
".."/[conf, beacon_clock, beacon_node, version],
".."/[conf, beacon_clock, beacon_node],
"."/[slashing_protection, validator_pool, keystore_management]
from eth/async_utils import awaitWithTimeout
@ -526,7 +526,7 @@ proc forkchoice_updated(state: bellatrix.BeaconState,
none(bellatrix.PayloadID)
proc get_execution_payload(
payload_id: Option[bellatrix.PayloadId], execution_engine: Eth1Monitor):
payload_id: Option[bellatrix.PayloadID], execution_engine: Eth1Monitor):
Future[bellatrix.ExecutionPayload] {.async.} =
return if payload_id.isNone():
# Pre-merge, empty payload