remove UnusedImport spam (#549)

* remove UnusedImport spam

* re-add random import to beacon_node
This commit is contained in:
Dustin Brody 2019-11-14 10:47:55 +00:00 committed by Mamy Ratsimbazafy
parent 24ade89e33
commit df1d00f13a
33 changed files with 80 additions and 38 deletions

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
import import
tables, algorithm, math, options, sequtils, tables, algorithm, math, sequtils,
json_serialization/std/sets, chronicles, stew/bitseqs, json_serialization/std/sets, chronicles, stew/bitseqs,
../extras, ../ssz, ../extras, ../ssz,
./crypto, ./datatypes, ./digest, ./helpers, ./validator ./crypto, ./datatypes, ./digest, ./helpers, ./validator

View File

@ -45,7 +45,6 @@
import import
sequtils,
stew/[endians2, objects, byteutils], hashes, nimcrypto/utils, stew/[endians2, objects, byteutils], hashes, nimcrypto/utils,
blscurve, json_serialization, blscurve, json_serialization,
../version, digest, ../version, digest,

View File

@ -10,7 +10,7 @@
import import
# Specs # Specs
../../beacon_chain/spec/[datatypes, digest, beaconstate, helpers], ../../beacon_chain/spec/[datatypes, digest],
../../beacon_chain/ssz, ../../beacon_chain/ssz,
# shims # shims
stew/objects stew/objects

View File

@ -14,7 +14,7 @@ import
# 0.19.6 shims # 0.19.6 shims
stew/objects, # import default stew/objects, # import default
# Specs # Specs
../../beacon_chain/spec/[datatypes, crypto, helpers, digest, beaconstate], ../../beacon_chain/spec/[datatypes, crypto, helpers, digest],
# Internals # Internals
../../beacon_chain/[ssz, extras], ../../beacon_chain/[ssz, extras],
# Mocking procs # Mocking procs

View File

@ -10,13 +10,11 @@
import import
# Specs # Specs
../../beacon_chain/spec/[datatypes, beaconstate, digest], ../../beacon_chain/spec/[datatypes, beaconstate],
# Internals # Internals
../../beacon_chain/[extras, interop], ../../beacon_chain/[extras, interop],
# Mocking procs # Mocking procs
./mock_deposits, ./mock_deposits
# Helpers
../helpers/digest_helpers
proc initGenesisState*(num_validators: uint64, genesis_time: uint64 = 0): BeaconState = proc initGenesisState*(num_validators: uint64, genesis_time: uint64 = 0): BeaconState =

View File

@ -5,9 +5,11 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard libs # Standard libs
os, unittest, endians, os, unittest,
# Status libs # Status libs
blscurve, stew/byteutils, blscurve, stew/byteutils,
# Beacon chain internals # Beacon chain internals

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
os, unittest, os, unittest,

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
os, unittest, os, unittest,

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
os, unittest, os, unittest,

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
os, unittest, os, unittest,

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
os, unittest, os, unittest,

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
os, unittest, os, unittest,

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
os, unittest, os, unittest,

View File

@ -5,9 +5,11 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
os, unittest, strutils, os, unittest,
# Beacon chain internals # Beacon chain internals
../../beacon_chain/spec/datatypes, ../../beacon_chain/spec/datatypes,
../../beacon_chain/state_transition, ../../beacon_chain/state_transition,

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
os, unittest, sequtils, os, unittest, sequtils,

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
os, unittest, strutils, os, unittest, strutils,

View File

@ -10,15 +10,17 @@
# https://github.com/ethereum/eth2.0-specs/blob/v0.8.1/specs/core/0_beacon-chain.md#genesis # https://github.com/ethereum/eth2.0-specs/blob/v0.8.1/specs/core/0_beacon-chain.md#genesis
# --------------------------------------------------------------- # ---------------------------------------------------------------
{.used.}
import import
# Standard library # Standard library
unittest, unittest,
# Specs # Specs
../../beacon_chain/spec/[beaconstate, datatypes, helpers, validator, digest], ../../beacon_chain/spec/datatypes,
# Internals # Internals
../../beacon_chain/[ssz, extras, state_transition], ../../beacon_chain/ssz,
# Mock helpers # Mock helpers
../mocking/[mock_deposits, mock_genesis], ../mocking/mock_genesis,
../testutil ../testutil

View File

@ -9,15 +9,15 @@
# https://github.com/ethereum/eth2.0-specs/blob/v0.8.1/specs/core/0_beacon-chain.md#attestations # https://github.com/ethereum/eth2.0-specs/blob/v0.8.1/specs/core/0_beacon-chain.md#attestations
# --------------------------------------------------------------- # ---------------------------------------------------------------
{.used.}
import import
# Standard library # Standard library
unittest, math, unittest,
# shims 0.19.6 # shims 0.19.6
stew/objects, # import default stew/objects, # import default
# Specs # Specs
../../beacon_chain/spec/[beaconstate, datatypes, helpers, validator], ../../beacon_chain/spec/[beaconstate, datatypes, helpers, validator],
# Internals
../../beacon_chain/[state_transition],
# Mock helpers # Mock helpers
../mocking/[mock_genesis, mock_attestations, mock_state, mock_blocks], ../mocking/[mock_genesis, mock_attestations, mock_state, mock_blocks],
../testutil ../testutil

View File

@ -10,13 +10,15 @@
# https://github.com/ethereum/eth2.0-specs/blob/v0.8.1/specs/core/0_beacon-chain.md#deposits # https://github.com/ethereum/eth2.0-specs/blob/v0.8.1/specs/core/0_beacon-chain.md#deposits
# --------------------------------------------------------------- # ---------------------------------------------------------------
{.used.}
import import
# Standard library # Standard library
unittest, math, unittest, math,
# Specs # Specs
../../beacon_chain/spec/[beaconstate, datatypes, crypto, helpers, validator], ../../beacon_chain/spec/[beaconstate, datatypes, crypto],
# Internals # Internals
../../beacon_chain/[ssz, extras, state_transition], ../../beacon_chain/[ssz, extras],
# Mock helpers # Mock helpers
../mocking/[mock_deposits, mock_genesis], ../mocking/[mock_deposits, mock_genesis],
../testutil, ../helpers/math_helpers ../testutil, ../helpers/math_helpers

View File

@ -7,7 +7,7 @@
import import
# Specs # Specs
../../beacon_chain/spec/[datatypes, state_transition_epoch, validator, helpers], ../../beacon_chain/spec/[datatypes, state_transition_epoch, validator],
# Internals # Internals
../../beacon_chain/[state_transition] ../../beacon_chain/[state_transition]

View File

@ -10,8 +10,6 @@ import
strformat, strformat,
# Specs # Specs
../../beacon_chain/spec/[datatypes, state_transition_epoch, validator, helpers], ../../beacon_chain/spec/[datatypes, state_transition_epoch, validator, helpers],
# Internals
../../beacon_chain/[state_transition],
# Test helpers # Test helpers
../helpers/digest_helpers ../helpers/digest_helpers

View File

@ -5,15 +5,15 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
# Standard library # Standard library
strformat, unittest, unittest,
# Vendored packages # Vendored packages
stew/bitops2, stew/bitops2,
# Specs # Specs
../../beacon_chain/spec/[datatypes, state_transition_epoch, validator, helpers], ../../beacon_chain/spec/datatypes,
# Internals
../../beacon_chain/[state_transition],
# Test helpers # Test helpers
../mocking/[mock_genesis], ../mocking/[mock_genesis],
./epoch_utils, ./epoch_utils,

View File

@ -5,8 +5,10 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
options, sequtils, unittest, options, unittest,
./testutil, ./testutil,
../beacon_chain/spec/[beaconstate, crypto, datatypes, digest, helpers, validator], ../beacon_chain/spec/[beaconstate, crypto, datatypes, digest, helpers, validator],
../beacon_chain/[beacon_node_types, attestation_pool, block_pool, extras, state_transition, ssz] ../beacon_chain/[beacon_node_types, attestation_pool, block_pool, extras, state_transition, ssz]

View File

@ -5,7 +5,9 @@
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) # * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
import options, unittest, sequtils, strutils, eth/trie/[db], {.used.}
import options, unittest, sequtils, eth/trie/[db],
../beacon_chain/[beacon_chain_db, extras, interop, ssz], ../beacon_chain/[beacon_chain_db, extras, interop, ssz],
../beacon_chain/spec/[beaconstate, datatypes, digest, crypto], ../beacon_chain/spec/[beaconstate, datatypes, digest, crypto],
# test utilies # test utilies

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
unittest, unittest,
../beacon_chain/beacon_node ../beacon_chain/beacon_node

View File

@ -5,10 +5,11 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
sequtils, unittest, unittest,
./testutil, ./testutil,
../beacon_chain/extras,
../beacon_chain/spec/[beaconstate, datatypes, digest] ../beacon_chain/spec/[beaconstate, datatypes, digest]
suite "Beacon state" & preset(): suite "Beacon state" & preset():

View File

@ -5,11 +5,13 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
options, sequtils, unittest, options, sequtils, unittest,
./testutil, ./testutil,
../beacon_chain/spec/[beaconstate, crypto, datatypes, digest, helpers, validator], ../beacon_chain/spec/[beaconstate, datatypes, digest],
../beacon_chain/[beacon_node_types, block_pool, beacon_chain_db, extras, state_transition, ssz] ../beacon_chain/[beacon_node_types, block_pool, beacon_chain_db, extras, ssz]
suite "Block pool processing" & preset(): suite "Block pool processing" & preset():
let let

View File

@ -5,8 +5,10 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
sequtils, unittest, unittest,
../beacon_chain/spec/[helpers] ../beacon_chain/spec/[helpers]
suite "Spec helpers": suite "Spec helpers":

View File

@ -1,7 +1,9 @@
{.used.}
import import
unittest, stint, blscurve, stew/byteutils, unittest, stint, blscurve, stew/byteutils,
../beacon_chain/[extras, interop, ssz], ../beacon_chain/[extras, interop, ssz],
../beacon_chain/spec/[beaconstate, digest, crypto, helpers, datatypes] ../beacon_chain/spec/[beaconstate, crypto, helpers, datatypes]
# Interop test yaml, found here: # Interop test yaml, found here:
# https://github.com/ethereum/eth2.0-pm/blob/a0b9d22fad424574b1307828f867b30237758468/interop/mocked_start/keygen_10_validators.yaml # https://github.com/ethereum/eth2.0-pm/blob/a0b9d22fad424574b1307828f867b30237758468/interop/mocked_start/keygen_10_validators.yaml

View File

@ -5,9 +5,11 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
unittest, sequtils, options, unittest, options,
stint, nimcrypto, eth/common, blscurve, serialization/testing/generic_suite, stint, nimcrypto, eth/common, serialization/testing/generic_suite,
../beacon_chain/spec/[datatypes, digest], ../beacon_chain/spec/[datatypes, digest],
../beacon_chain/ssz, ../beacon_chain/ssz/[navigator, dynamic_navigator] ../beacon_chain/ssz, ../beacon_chain/ssz/[navigator, dynamic_navigator]

View File

@ -5,11 +5,13 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
options, sequtils, unittest, chronicles, options, unittest, chronicles,
./testutil, ./testutil,
../beacon_chain/spec/[beaconstate, crypto, datatypes, digest, helpers, validator], ../beacon_chain/spec/[beaconstate, datatypes, digest, validator],
../beacon_chain/[extras, state_transition, ssz] ../beacon_chain/[state_transition, ssz]
suite "Block processing" & preset(): suite "Block processing" & preset():
## For now just test that we can compile and execute block processing with ## For now just test that we can compile and execute block processing with

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
unittest, unittest,
../beacon_chain/sync_protocol ../beacon_chain/sync_protocol

View File

@ -5,6 +5,8 @@
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
{.used.}
import import
unittest, unittest,
../beacon_chain/spec/[datatypes, crypto], ../beacon_chain/spec/[datatypes, crypto],