From 4fd3177dab6668c80f0e6822be8aaeb193d1bd4c Mon Sep 17 00:00:00 2001 From: tersec Date: Mon, 22 Jan 2024 16:35:19 +0000 Subject: [PATCH] clean up UnusedImport and Deprecated warnings (#5813) --- beacon_chain/networking/eth2_network.nim | 3 +-- ncli/validator_db_aggregator.nim | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index 94081e413..f78a41c4d 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -2262,8 +2262,7 @@ proc createEth2Node*(rng: ref HmacDrbgContext, info "Adding privileged direct peer", peerId, address res - hostAddress = tcpEndPoint( - ValidIpAddress.init config.listenAddress, config.tcpPort) + hostAddress = tcpEndPoint(config.listenAddress, config.tcpPort) announcedAddresses = if extIp.isNone() or extTcpPort.isNone(): @[] else: @[tcpEndPoint(extIp.get(), extTcpPort.get())] diff --git a/ncli/validator_db_aggregator.nim b/ncli/validator_db_aggregator.nim index 6286bdfa3..d1e165705 100644 --- a/ncli/validator_db_aggregator.nim +++ b/ncli/validator_db_aggregator.nim @@ -6,14 +6,10 @@ # at your option. This file may not be copied, modified, or distributed except according to those terms. import - std/parsecsv, stew/[io2, byteutils], chronicles, confutils, snappy, ../beacon_chain/spec/datatypes/base, ./ncli_common -from std/os import fileExists -from std/strutils import parseBiggestInt, parseBiggestUInt - type AggregatorConf = object startEpoch {. @@ -159,6 +155,9 @@ proc advanceEpochs*(aggregator: var ValidatorDbAggregator, epoch: Epoch, when isMainModule: import std/streams + from std/os import fileExists + from std/parsecsv import CsvParser, CsvRow, open, readRow + from std/strutils import parseBiggestInt, parseBiggestUInt when defined(posix): import system/ansi_c