From 4c6878343c1291125244773b52397a0f920cafc4 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Mon, 9 Dec 2019 12:08:42 +0100 Subject: [PATCH] tighten a few imports --- eth/bloom.nim | 2 +- eth/common/eth_types.nim | 2 +- eth/common/transaction.nim | 2 +- eth/common/utils.nim | 2 +- eth/p2p/ecies.nim | 2 +- tests/keys/config.nim | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eth/bloom.nim b/eth/bloom.nim index b4e8231..6377673 100644 --- a/eth/bloom.nim +++ b/eth/bloom.nim @@ -1,4 +1,4 @@ -import stint, nimcrypto +import stint, nimcrypto/[keccak, hash] type UInt2048 = StUint[2048] diff --git a/eth/common/eth_types.nim b/eth/common/eth_types.nim index 92ff596..967a705 100644 --- a/eth/common/eth_types.nim +++ b/eth/common/eth_types.nim @@ -1,6 +1,6 @@ import endians, options, times, chronicles, - stint, nimcrypto, eth/rlp, eth/trie/[trie_defs, db] + stint, nimcrypto/[keccak, hash], eth/rlp, eth/trie/[trie_defs, db] export stint, read, append, KeccakHash diff --git a/eth/common/transaction.nim b/eth/common/transaction.nim index 2a3ad3d..8c4fd95 100644 --- a/eth/common/transaction.nim +++ b/eth/common/transaction.nim @@ -1,5 +1,5 @@ import - eth/[common, rlp, keys], nimcrypto + eth/[common, rlp, keys], nimcrypto/keccak proc initTransaction*(nonce: AccountNonce, gasPrice, gasLimit: GasInt, to: EthAddress, value: UInt256, payload: Blob, V: byte, R, S: UInt256, isContractCreation = false): Transaction = diff --git a/eth/common/utils.nim b/eth/common/utils.nim index 9f2e687..df14e85 100644 --- a/eth/common/utils.nim +++ b/eth/common/utils.nim @@ -1,4 +1,4 @@ -import nimcrypto, hashes, stew/byteutils, eth_types, metrics +import nimcrypto/hash, hashes, stew/byteutils, eth_types, metrics export metrics diff --git a/eth/p2p/ecies.nim b/eth/p2p/ecies.nim index 95d7cca..e60703d 100644 --- a/eth/p2p/ecies.nim +++ b/eth/p2p/ecies.nim @@ -10,7 +10,7 @@ ## This module implements ECIES method encryption/decryption. -import eth/keys, nimcrypto +import eth/keys, nimcrypto/[rijndael, bcmode, hash, hmac, sysrand, sha2, utils] const emptyMac* = array[0, byte]([]) diff --git a/tests/keys/config.nim b/tests/keys/config.nim index 93454d2..c522170 100644 --- a/tests/keys/config.nim +++ b/tests/keys/config.nim @@ -29,7 +29,7 @@ # doAssert crypto.ecdsa_recover(msghash, sig) == pubkey # """ -import nimcrypto +import nimcrypto/keccak type testKeySig* = object