code cleanup removed unused imports

This commit is contained in:
bmoo 2021-08-11 21:37:00 +02:00 committed by jangko
parent 8fcd8354b1
commit b09ad5cacb
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
12 changed files with 16 additions and 20 deletions

View File

@ -8,10 +8,8 @@
# those terms.
import
std/[terminal, os],
chronicles, eth/trie/db, eth/[common, rlp], stew/[io2, byteutils],
./config, ./genesis, ./p2p/chain,
./db/[db_chain, select_backend, storage_types]
chronicles, eth/[common, rlp], stew/io2,
./p2p/chain, ./db/[db_chain, select_backend]
type
# trick the rlp decoder

View File

@ -1,5 +1,5 @@
import
std/[json, strutils, times, tables],
std/[json, times, tables],
eth/[common, rlp, trie, p2p], stew/[byteutils],
chronicles, eth/trie/db,
./db/[db_chain, state_db],

View File

@ -18,7 +18,7 @@ import
eth/p2p/rlpx_protocols/les_protocol,
./p2p/blockchain_sync, eth/net/nat, eth/p2p/peer_pool,
./sync/protocol_eth65,
config, genesis, rpc/[common, p2p, debug, key_storage], p2p/chain,
config, genesis, rpc/[common, p2p, debug], p2p/chain,
eth/trie/db, metrics, metrics/[chronos_httpserver, chronicles_support],
graphql/ethapi,
"."/[utils, conf_utils]

View File

@ -8,7 +8,7 @@
# those terms.
import
strutils, json, options,
json, options,
json_rpc/rpcserver, rpc_utils, eth/common,
hexstrings, ../tracer, ../vm_types,
../db/[db_chain]

View File

@ -8,7 +8,7 @@
# those terms.
import
strutils, times, options, tables,
times, options, tables,
json_rpc/rpcserver, hexstrings, stint, stew/byteutils,
eth/[common, keys, rlp, p2p], nimcrypto,
../transaction, ../config, ../vm_state, ../constants,

View File

@ -9,12 +9,10 @@
import hexstrings, eth/[common, rlp, keys, trie/db], stew/byteutils, nimcrypto,
../db/db_chain, strutils, algorithm, options, times, json,
../constants, stint, hexstrings, rpc_types, ../chain_config,
../constants, stint, hexstrings, rpc_types,
../utils, ../transaction,
../transaction/call_evm
import eth/common/transaction as common_transaction
func toAddress*(value: EthAddressStr): EthAddress = hexToPaddedByteArray[20](value.string)
func toHash*(value: array[32, byte]): Hash256 {.inline.} =

View File

@ -13,8 +13,7 @@
import
chronos, stint, chronicles, stew/byteutils, macros,
eth/[common/eth_types, rlp, p2p],
eth/p2p/[rlpx, private/p2p_types, blockchain_utils],
../p2p/chain
eth/p2p/[rlpx, private/p2p_types, blockchain_utils]
type
NewBlockHashesAnnounce* = object

View File

@ -10,8 +10,11 @@ import
eth/common/eth_types, stint, options, stew/ranges/ptr_arith,
".."/[vm_types, vm_state, vm_computation, vm_state_transactions],
".."/[vm_internals, vm_precompiles, vm_gas_costs],
".."/[db/accounts_cache, utils, forks],
./host_types, ./host_services
".."/[db/accounts_cache, forks],
./host_types
when defined(evmc_enabled):
import ".."/[utils]
type
# Standard call parameters.

View File

@ -11,7 +11,7 @@
import
sets, times, stint, chronicles,
eth/common/eth_types, ../db/accounts_cache, ../forks,
".."/[vm_types, vm_state, vm_computation, vm_internals],
".."/[vm_state, vm_computation, vm_internals],
./host_types, ./host_trace, ./host_call_nested
proc setupTxContext(host: TransactionHost) =

View File

@ -9,8 +9,7 @@ import
tables, macros,
chronicles,
./interpreter/[opcode_values, opcodes_impl, gas_costs, gas_meter, utils/macros_gen_opcodes],
./code_stream, ./types, ../errors, ../forks, ./precompiles, ./stack,
terminal # Those are only needed for logging
./code_stream, ./types, ../errors, ../forks, ./precompiles, ./stack
logScope:
topics = "vm opcode"

View File

@ -8,7 +8,7 @@
import
options, sets,
eth/common, chronicles, ../db/accounts_cache,
../transaction, ../forks,
../forks,
./computation, ./interpreter, ./state, ./types
proc execComputation*(c: Computation) =

View File

@ -431,7 +431,6 @@ template gasCosts(fork: Fork, prefix, ResultGasCostsName: untyped) =
# ###################################################################################################
# TODO - change this `let` into `const` - pending: https://github.com/nim-lang/Nim/issues/8015
let `ResultGasCostsName`*{.inject, compileTime.}: GasCosts = block:
# We use a block expression to avoid name redefinition conflicts
# with "fixed" and "dynamic"