From 0e83cfda97a140091f9a25c6ef55e8c72676c917 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Thu, 30 May 2024 14:46:57 +0200 Subject: [PATCH] results: use standalone repo (#687) --- eth.nimble | 3 ++- eth/db/kvstore.nim | 2 +- eth/keyfile/keyfile.nim | 2 +- eth/net/nat.nim | 2 +- eth/net/utils.nim | 2 +- eth/p2p/discoveryv5/nodes_verification.nim | 2 +- eth/p2p/discoveryv5/protocol.nim | 2 +- eth/p2p/discoveryv5/routing_table.nim | 2 +- eth/p2p/rlpxcrypt.nim | 2 +- eth/rlp/writer.nim | 7 ++++--- eth/trie/hexary_proof_verification.nim | 2 +- 11 files changed, 15 insertions(+), 13 deletions(-) diff --git a/eth.nimble b/eth.nimble index 105ae2e..65d672e 100644 --- a/eth.nimble +++ b/eth.nimble @@ -18,7 +18,8 @@ requires "nim >= 1.6.0", "sqlite3_abi", "confutils", "testutils", - "unittest2" + "unittest2", + "results" let nimc = getEnv("NIMC", "nim") # Which nim compiler to use let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js) diff --git a/eth/db/kvstore.nim b/eth/db/kvstore.nim index 653fc4b..8eb499e 100644 --- a/eth/db/kvstore.nim +++ b/eth/db/kvstore.nim @@ -13,7 +13,7 @@ import std/[tables, hashes, sets], - stew/results + results export results diff --git a/eth/keyfile/keyfile.nim b/eth/keyfile/keyfile.nim index 5071613..756e0b9 100644 --- a/eth/keyfile/keyfile.nim +++ b/eth/keyfile/keyfile.nim @@ -12,7 +12,7 @@ import std/[strutils, json], nimcrypto/[bcmode, hmac, rijndael, pbkdf2, sha2, sysrand, utils, keccak, scrypt], - stew/results, + results, ../keys, ./uuid diff --git a/eth/net/nat.nim b/eth/net/nat.nim index 84faeea..89b5cfd 100644 --- a/eth/net/nat.nim +++ b/eth/net/nat.nim @@ -10,7 +10,7 @@ import std/[options, os, strutils, times], - stew/results, nat_traversal/[miniupnpc, natpmp], + results, nat_traversal/[miniupnpc, natpmp], chronicles, json_serialization/std/net, chronos, ../common/utils, ./utils as netutils diff --git a/eth/net/utils.nim b/eth/net/utils.nim index b1cbc5e..e4f995d 100644 --- a/eth/net/utils.nim +++ b/eth/net/utils.nim @@ -9,7 +9,7 @@ import std/[tables, hashes, net], - stew/results, chronos, chronicles + results, chronos, chronicles export net.IpAddress diff --git a/eth/p2p/discoveryv5/nodes_verification.nim b/eth/p2p/discoveryv5/nodes_verification.nim index 5bb1771..1963ead 100644 --- a/eth/p2p/discoveryv5/nodes_verification.nim +++ b/eth/p2p/discoveryv5/nodes_verification.nim @@ -10,7 +10,7 @@ import std/[sets, options, net], - stew/results, chronicles, chronos, + results, chronicles, chronos, ../../net/utils, "."/[node, enr, routing_table] diff --git a/eth/p2p/discoveryv5/protocol.nim b/eth/p2p/discoveryv5/protocol.nim index 0c3942d..f46a906 100644 --- a/eth/p2p/discoveryv5/protocol.nim +++ b/eth/p2p/discoveryv5/protocol.nim @@ -83,7 +83,7 @@ import std/[tables, sets, options, math, sequtils, algorithm], json_serialization/std/net, - stew/results, chronicles, chronos, stint, metrics, + results, chronicles, chronos, stint, metrics, ".."/../[rlp, keys], "."/[messages_encoding, encoding, node, routing_table, enr, random2, sessions, ip_vote, nodes_verification] diff --git a/eth/p2p/discoveryv5/routing_table.nim b/eth/p2p/discoveryv5/routing_table.nim index f102f22..76f1d69 100644 --- a/eth/p2p/discoveryv5/routing_table.nim +++ b/eth/p2p/discoveryv5/routing_table.nim @@ -9,7 +9,7 @@ import std/[algorithm, times, sequtils, bitops, sets], - bearssl/rand, stew/results, + bearssl/rand, results, stint, chronicles, metrics, chronos, ../../net/utils, "."/[node, random2, enr] diff --git a/eth/p2p/rlpxcrypt.nim b/eth/p2p/rlpxcrypt.nim index 6affb45..aa793be 100644 --- a/eth/p2p/rlpxcrypt.nim +++ b/eth/p2p/rlpxcrypt.nim @@ -13,7 +13,7 @@ {.push raises: [].} import - nimcrypto/[bcmode, keccak, rijndael, utils], stew/results + nimcrypto/[bcmode, keccak, rijndael, utils], results from auth import ConnectionSecret export results diff --git a/eth/rlp/writer.nim b/eth/rlp/writer.nim index a562b8a..bf884b7 100644 --- a/eth/rlp/writer.nim +++ b/eth/rlp/writer.nim @@ -300,9 +300,10 @@ proc appendImpl(self: var RlpWriter, data: tuple) {.inline.} = # score in order to facilitate easier overloading with user types: template append*[T](w: var RlpWriter; data: T) = when data is (SomeSignedInt|enum|bool): - # TODO potentially remove signed integer support - we should never make it - # this far! - {.warning: "Signed integers cannot reliably be encoded using RLP".} + when data is SomeSignedInt: + # TODO potentially remove signed integer support - we should never make it + # this far! + {.warning: "Signed integers cannot reliably be encoded using RLP".} appendImpl(w, uint64(data)) else: appendImpl(w, data) diff --git a/eth/trie/hexary_proof_verification.nim b/eth/trie/hexary_proof_verification.nim index 6c20314..bb03272 100644 --- a/eth/trie/hexary_proof_verification.nim +++ b/eth/trie/hexary_proof_verification.nim @@ -9,7 +9,7 @@ import std/[tables, options, sequtils], - stew/results, + results, nimcrypto/[keccak, hash], ".."/rlp, "."/[trie_defs, nibbles, db]