diff --git a/apps/chat2/chat2.nim b/apps/chat2/chat2.nim index 42e2461b1..20a692903 100644 --- a/apps/chat2/chat2.nim +++ b/apps/chat2/chat2.nim @@ -4,10 +4,7 @@ when not (compileOption("threads")): {.fatal: "Please, compile this program with the --threads:on option!".} -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[strformat, strutils, times, options, random] import diff --git a/apps/chat2bridge/chat2bridge.nim b/apps/chat2bridge/chat2bridge.nim index 6a0aaef6c..2e30aaaa2 100644 --- a/apps/chat2bridge/chat2bridge.nim +++ b/apps/chat2bridge/chat2bridge.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[tables, times, strutils, hashes, sequtils], diff --git a/apps/liteprotocoltester/liteprotocoltester.nim b/apps/liteprotocoltester/liteprotocoltester.nim index 3f09eb31d..d63003be3 100644 --- a/apps/liteprotocoltester/liteprotocoltester.nim +++ b/apps/liteprotocoltester/liteprotocoltester.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, strutils, os, sequtils, net], diff --git a/apps/liteprotocoltester/statistics.nim b/apps/liteprotocoltester/statistics.nim index 4c4f40709..13e749193 100644 --- a/apps/liteprotocoltester/statistics.nim +++ b/apps/liteprotocoltester/statistics.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sets, tables, strutils, sequtils, options, strformat], diff --git a/apps/liteprotocoltester/tester_message.nim b/apps/liteprotocoltester/tester_message.nim index 635a31ab4..a34cb4b75 100644 --- a/apps/liteprotocoltester/tester_message.nim +++ b/apps/liteprotocoltester/tester_message.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, diff --git a/apps/networkmonitor/networkmonitor.nim b/apps/networkmonitor/networkmonitor.nim index 1bfaee062..fa21c231b 100644 --- a/apps/networkmonitor/networkmonitor.nim +++ b/apps/networkmonitor/networkmonitor.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[tables, strutils, times, sequtils, random], diff --git a/apps/networkmonitor/networkmonitor_metrics.nim b/apps/networkmonitor/networkmonitor_metrics.nim index 70b10cdc4..e8bcb7097 100644 --- a/apps/networkmonitor/networkmonitor_metrics.nim +++ b/apps/networkmonitor/networkmonitor_metrics.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[json, tables, sequtils], diff --git a/apps/networkmonitor/networkmonitor_utils.nim b/apps/networkmonitor/networkmonitor_utils.nim index 34cd3093a..eef6f6681 100644 --- a/apps/networkmonitor/networkmonitor_utils.nim +++ b/apps/networkmonitor/networkmonitor_utils.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/json, diff --git a/apps/wakunode2/wakunode2.nim b/apps/wakunode2/wakunode2.nim index 474eef1f7..b5f165c0d 100644 --- a/apps/wakunode2/wakunode2.nim +++ b/apps/wakunode2/wakunode2.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, strutils, sequtils, net], diff --git a/examples/wakustealthcommitments/erc_5564_interface.nim b/examples/wakustealthcommitments/erc_5564_interface.nim index a2bd53b6e..89753815d 100644 --- a/examples/wakustealthcommitments/erc_5564_interface.nim +++ b/examples/wakustealthcommitments/erc_5564_interface.nim @@ -1,8 +1,5 @@ ## Nim wrappers for the functions defined in librln -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results diff --git a/examples/wakustealthcommitments/node_spec.nim b/examples/wakustealthcommitments/node_spec.nim index a080b5107..85289b32a 100644 --- a/examples/wakustealthcommitments/node_spec.nim +++ b/examples/wakustealthcommitments/node_spec.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ../../waku/common/logging, ../../waku/factory/[waku, networks_config, external_config] diff --git a/examples/wakustealthcommitments/stealth_commitment_protocol.nim b/examples/wakustealthcommitments/stealth_commitment_protocol.nim index 1b1c9cd46..3a50297a9 100644 --- a/examples/wakustealthcommitments/stealth_commitment_protocol.nim +++ b/examples/wakustealthcommitments/stealth_commitment_protocol.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results, diff --git a/examples/wakustealthcommitments/wakustealthcommitments.nim b/examples/wakustealthcommitments/wakustealthcommitments.nim index a6cf4a562..7f17bd01b 100644 --- a/examples/wakustealthcommitments/wakustealthcommitments.nim +++ b/examples/wakustealthcommitments/wakustealthcommitments.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results, chronicles, ./node_spec as Waku, ./stealth_commitment_protocol as SCP diff --git a/tests/waku_rln_relay/test_rln_group_manager_onchain.nim b/tests/waku_rln_relay/test_rln_group_manager_onchain.nim index 94b1ed213..c6e29e5bd 100644 --- a/tests/waku_rln_relay/test_rln_group_manager_onchain.nim +++ b/tests/waku_rln_relay/test_rln_group_manager_onchain.nim @@ -1,9 +1,6 @@ {.used.} -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, os, osproc, sequtils, deques, streams, strutils, tempfiles, strformat], diff --git a/tests/waku_rln_relay/test_rln_group_manager_static.nim b/tests/waku_rln_relay/test_rln_group_manager_static.nim index a9f2a71e4..e0617df7e 100644 --- a/tests/waku_rln_relay/test_rln_group_manager_static.nim +++ b/tests/waku_rln_relay/test_rln_group_manager_static.nim @@ -1,9 +1,6 @@ {.used.} -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import testutils/unittests, diff --git a/tests/waku_rln_relay/test_rln_serde.nim b/tests/waku_rln_relay/test_rln_serde.nim index b1b57f53c..4517d86dd 100644 --- a/tests/waku_rln_relay/test_rln_serde.nim +++ b/tests/waku_rln_relay/test_rln_serde.nim @@ -1,9 +1,6 @@ {.used.} -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ./rln/waku_rln_relay_utils, diff --git a/waku/common/base64.nim b/waku/common/base64.nim index 46fc6ec5a..65e74cd8f 100644 --- a/waku/common/base64.nim +++ b/waku/common/base64.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/[results, byteutils, base64] diff --git a/waku/common/confutils/envvar/defs.nim b/waku/common/confutils/envvar/defs.nim index 2c23df4af..4f71bd88f 100644 --- a/waku/common/confutils/envvar/defs.nim +++ b/waku/common/confutils/envvar/defs.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import confutils/defs as confutilsDefs import ../../envvar_serialization diff --git a/waku/common/confutils/envvar/std/net.nim b/waku/common/confutils/envvar/std/net.nim index 4f46fa9e1..4264373a6 100644 --- a/waku/common/confutils/envvar/std/net.nim +++ b/waku/common/confutils/envvar/std/net.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[strutils, net] import ../../../envvar_serialization diff --git a/waku/common/databases/db_postgres/pgasyncpool.nim b/waku/common/databases/db_postgres/pgasyncpool.nim index bf20625dc..0b08b9c31 100644 --- a/waku/common/databases/db_postgres/pgasyncpool.nim +++ b/waku/common/databases/db_postgres/pgasyncpool.nim @@ -1,9 +1,6 @@ # Simple async pool driver for postgress. # Inspired by: https://github.com/treeform/pg/ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sequtils, nre, strformat, sets], stew/results, chronos import ./dbconn, ../common diff --git a/waku/common/enr/builder.nim b/waku/common/enr/builder.nim index 84b89ca02..5795e37f5 100644 --- a/waku/common/enr/builder.nim +++ b/waku/common/enr/builder.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, net], diff --git a/waku/common/enr/typed_record.nim b/waku/common/enr/typed_record.nim index ea2c54278..babf9cc76 100644 --- a/waku/common/enr/typed_record.nim +++ b/waku/common/enr/typed_record.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, stew/results, eth/keys as eth_keys, libp2p/crypto/crypto as libp2p_crypto diff --git a/waku/common/envvar_serialization.nim b/waku/common/envvar_serialization.nim index 71607ed26..53314ef09 100644 --- a/waku/common/envvar_serialization.nim +++ b/waku/common/envvar_serialization.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/shims/macros, serialization import ./envvar_serialization/reader, ./envvar_serialization/writer diff --git a/waku/common/envvar_serialization/reader.nim b/waku/common/envvar_serialization/reader.nim index a4f94e9ed..66869e3b4 100644 --- a/waku/common/envvar_serialization/reader.nim +++ b/waku/common/envvar_serialization/reader.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[tables, typetraits, options, os], diff --git a/waku/common/envvar_serialization/utils.nim b/waku/common/envvar_serialization/utils.nim index c0a9762a0..cb2c6283c 100644 --- a/waku/common/envvar_serialization/utils.nim +++ b/waku/common/envvar_serialization/utils.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[os, strutils], stew/byteutils, stew/ptrops diff --git a/waku/common/hexstrings.nim b/waku/common/hexstrings.nim index 0b1d963d2..fd6b590bc 100644 --- a/waku/common/hexstrings.nim +++ b/waku/common/hexstrings.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} type HexDataStr* = distinct string diff --git a/waku/common/logging.nim b/waku/common/logging.nim index a955d3d68..e8394e89f 100644 --- a/waku/common/logging.nim +++ b/waku/common/logging.nim @@ -8,10 +8,7 @@ import export chronicles.LogLevel -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} type LogFormat* = enum TEXT diff --git a/waku/common/nimchronos.nim b/waku/common/nimchronos.nim index 8f3d400fd..dc425c475 100644 --- a/waku/common/nimchronos.nim +++ b/waku/common/nimchronos.nim @@ -1,8 +1,5 @@ ## An extension wrapper around nim-chronos -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronos, chronicles diff --git a/waku/common/protobuf.nim b/waku/common/protobuf.nim index cafd83e65..20c29ab83 100644 --- a/waku/common/protobuf.nim +++ b/waku/common/protobuf.nim @@ -1,9 +1,6 @@ # Extensions for libp2p's protobuf library implementation -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, libp2p/protobuf/minprotobuf, libp2p/varint diff --git a/waku/common/ratelimit.nim b/waku/common/ratelimit.nim index 70001086b..1c40cd42a 100644 --- a/waku/common/ratelimit.nim +++ b/waku/common/ratelimit.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, chronos/timer, libp2p/stream/connection diff --git a/waku/common/tokenbucket.nim b/waku/common/tokenbucket.nim index 2223e0bbf..a35939f7a 100644 --- a/waku/common/tokenbucket.nim +++ b/waku/common/tokenbucket.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronos diff --git a/waku/common/utils/matterbridge_client.nim b/waku/common/utils/matterbridge_client.nim index 634a58368..c04d2280f 100644 --- a/waku/common/utils/matterbridge_client.nim +++ b/waku/common/utils/matterbridge_client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[httpclient, json, uri, options], stew/results diff --git a/waku/common/utils/nat.nim b/waku/common/utils/nat.nim index 5835a8e7f..8af1ec2ad 100644 --- a/waku/common/utils/nat.nim +++ b/waku/common/utils/nat.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, strutils, net] import chronicles, eth/net/nat, stew/results, nativesockets diff --git a/waku/common/utils/sequence.nim b/waku/common/utils/sequence.nim index 7af75c32b..ad243d82c 100644 --- a/waku/common/utils/sequence.nim +++ b/waku/common/utils/sequence.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} proc flatten*[T](a: seq[seq[T]]): seq[T] = var aFlat = newSeq[T](0) diff --git a/waku/common/waku_service_metrics.nim b/waku/common/waku_service_metrics.nim index 0ea85205c..fe0bbf05c 100644 --- a/waku/common/waku_service_metrics.nim +++ b/waku/common/waku_service_metrics.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import metrics diff --git a/waku/discovery/waku_discv5.nim b/waku/discovery/waku_discv5.nim index 9033b7924..c6dc5553d 100644 --- a/waku/discovery/waku_discv5.nim +++ b/waku/discovery/waku_discv5.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sequtils, strutils, options, sets, net, json], diff --git a/waku/discovery/waku_dnsdisc.nim b/waku/discovery/waku_dnsdisc.nim index 9d1b76b6a..b31de2cf5 100644 --- a/waku/discovery/waku_dnsdisc.nim +++ b/waku/discovery/waku_dnsdisc.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} ## A set of utilities to integrate EIP-1459 DNS-based discovery ## for Waku v2 nodes. diff --git a/waku/factory/builder.nim b/waku/factory/builder.nim index 3d64f5855..f06d28331 100644 --- a/waku/factory/builder.nim +++ b/waku/factory/builder.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, net], diff --git a/waku/factory/networks_config.nim b/waku/factory/networks_config.nim index 9837cdaeb..b31aec3c4 100644 --- a/waku/factory/networks_config.nim +++ b/waku/factory/networks_config.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} type ClusterConf* = object maxMessageSize*: string diff --git a/waku/factory/validator_signed.nim b/waku/factory/validator_signed.nim index 5686ed1f8..f4a9253ad 100644 --- a/waku/factory/validator_signed.nim +++ b/waku/factory/validator_signed.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, diff --git a/waku/factory/waku.nim b/waku/factory/waku.nim index a461f65c5..3c8862093 100644 --- a/waku/factory/waku.nim +++ b/waku/factory/waku.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, sequtils], diff --git a/waku/node/config.nim b/waku/node/config.nim index d3f2a3dfd..2ebe2a007 100644 --- a/waku/node/config.nim +++ b/waku/node/config.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, sequtils, strutils, net], diff --git a/waku/node/health_monitor.nim b/waku/node/health_monitor.nim index 444a46b55..b3fe9b227 100644 --- a/waku/node/health_monitor.nim +++ b/waku/node/health_monitor.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options], chronos diff --git a/waku/node/peer_manager/peer_manager.nim b/waku/node/peer_manager/peer_manager.nim index a2a8585cb..3e7a4e3c7 100644 --- a/waku/node/peer_manager/peer_manager.nim +++ b/waku/node/peer_manager/peer_manager.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, sets, sequtils, times, strutils, math, random], diff --git a/waku/node/peer_manager/peer_store/migrations.nim b/waku/node/peer_manager/peer_store/migrations.nim index abb628d19..dc0214cfe 100644 --- a/waku/node/peer_manager/peer_store/migrations.nim +++ b/waku/node/peer_manager/peer_store/migrations.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[tables, strutils, os], stew/results, chronicles import ../../../common/databases/db_sqlite, ../../../common/databases/common diff --git a/waku/node/peer_manager/peer_store/peer_storage.nim b/waku/node/peer_manager/peer_store/peer_storage.nim index c3b377f51..ded076299 100644 --- a/waku/node/peer_manager/peer_store/peer_storage.nim +++ b/waku/node/peer_manager/peer_store/peer_storage.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results import ../../../waku_core, ../waku_peer_store diff --git a/waku/node/peer_manager/peer_store/waku_peer_storage.nim b/waku/node/peer_manager/peer_store/waku_peer_storage.nim index 2ba3006ed..56544e2f5 100644 --- a/waku/node/peer_manager/peer_store/waku_peer_storage.nim +++ b/waku/node/peer_manager/peer_store/waku_peer_storage.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sets, options], diff --git a/waku/node/peer_manager/waku_peer_store.nim b/waku/node/peer_manager/waku_peer_store.nim index e8b99f85c..a7db829f2 100644 --- a/waku/node/peer_manager/waku_peer_store.nim +++ b/waku/node/peer_manager/waku_peer_store.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[tables, sequtils, sets, options, strutils], diff --git a/waku/node/waku_metrics.nim b/waku/node/waku_metrics.nim index 9ee19c9d3..c349f0849 100644 --- a/waku/node/waku_metrics.nim +++ b/waku/node/waku_metrics.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, chronos, metrics, metrics/chronos_httpserver import diff --git a/waku/node/waku_node.nim b/waku/node/waku_node.nim index 8d1ff8d79..513da4972 100644 --- a/waku/node/waku_node.nim +++ b/waku/node/waku_node.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[hashes, options, sugar, tables, strutils, sequtils, os, net], diff --git a/waku/node/waku_switch.nim b/waku/node/waku_switch.nim index d06291105..65e7c1999 100644 --- a/waku/node/waku_switch.nim +++ b/waku/node/waku_switch.nim @@ -1,8 +1,5 @@ # Waku Switch utils. -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, diff --git a/waku/utils/collector.nim b/waku/utils/collector.nim index 32ade16c5..de6411ae3 100644 --- a/waku/utils/collector.nim +++ b/waku/utils/collector.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import metrics diff --git a/waku/utils/noise.nim b/waku/utils/noise.nim index 77ea86b81..80b537197 100644 --- a/waku/utils/noise.nim +++ b/waku/utils/noise.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results import ../waku_core, ../waku_noise/noise_types, ../waku_noise/noise_utils diff --git a/waku/utils/requests.nim b/waku/utils/requests.nim index 40ee6773b..5e5b9d960 100644 --- a/waku/utils/requests.nim +++ b/waku/utils/requests.nim @@ -1,9 +1,6 @@ # Request utils. -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import bearssl/rand, stew/byteutils diff --git a/waku/waku_api/handlers.nim b/waku/waku_api/handlers.nim index 0b99021fb..2b6997e15 100644 --- a/waku/waku_api/handlers.nim +++ b/waku/waku_api/handlers.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronos, std/[options, sequtils], stew/results import ../discovery/waku_discv5, ../waku_relay, ../waku_core, ./message_cache diff --git a/waku/waku_api/message_cache.nim b/waku/waku_api/message_cache.nim index 66b9c62d9..ef9ebb44c 100644 --- a/waku/waku_api/message_cache.nim +++ b/waku/waku_api/message_cache.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sequtils, sugar, algorithm, options], diff --git a/waku/waku_api/rest/admin/client.nim b/waku/waku_api/rest/admin/client.nim index 6c9d92472..1fd9fdfc8 100644 --- a/waku/waku_api/rest/admin/client.nim +++ b/waku/waku_api/rest/admin/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, diff --git a/waku/waku_api/rest/admin/handlers.nim b/waku/waku_api/rest/admin/handlers.nim index fc523391c..1ac7a79d5 100644 --- a/waku/waku_api/rest/admin/handlers.nim +++ b/waku/waku_api/rest/admin/handlers.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[strformat, sequtils, tables], diff --git a/waku/waku_api/rest/admin/types.nim b/waku/waku_api/rest/admin/types.nim index a27d10414..fc6470658 100644 --- a/waku/waku_api/rest/admin/types.nim +++ b/waku/waku_api/rest/admin/types.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, diff --git a/waku/waku_api/rest/builder.nim b/waku/waku_api/rest/builder.nim index eda835b6d..08ef998a7 100644 --- a/waku/waku_api/rest/builder.nim +++ b/waku/waku_api/rest/builder.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import net, tables import presto diff --git a/waku/waku_api/rest/client.nim b/waku/waku_api/rest/client.nim index 7693e8878..2f61eaaa8 100644 --- a/waku/waku_api/rest/client.nim +++ b/waku/waku_api/rest/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import presto/client diff --git a/waku/waku_api/rest/debug/client.nim b/waku/waku_api/rest/debug/client.nim index 1929b28bf..cc8c0883b 100644 --- a/waku/waku_api/rest/debug/client.nim +++ b/waku/waku_api/rest/debug/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, json_serialization, json_serialization/std/options, presto/[route, client] diff --git a/waku/waku_api/rest/debug/handlers.nim b/waku/waku_api/rest/debug/handlers.nim index 52cd60152..fa55f0372 100644 --- a/waku/waku_api/rest/debug/handlers.nim +++ b/waku/waku_api/rest/debug/handlers.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, json_serialization, presto/route import ../../../waku_node, ../responses, ../serdes, ./types diff --git a/waku/waku_api/rest/debug/types.nim b/waku/waku_api/rest/debug/types.nim index 1f5949f75..0ca52c4a5 100644 --- a/waku/waku_api/rest/debug/types.nim +++ b/waku/waku_api/rest/debug/types.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, json_serialization, json_serialization/std/options import ../../../waku_node, ../serdes diff --git a/waku/waku_api/rest/filter/client.nim b/waku/waku_api/rest/filter/client.nim index abd530c41..b674bc594 100644 --- a/waku/waku_api/rest/filter/client.nim +++ b/waku/waku_api/rest/filter/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import json, diff --git a/waku/waku_api/rest/filter/handlers.nim b/waku/waku_api/rest/filter/handlers.nim index a5308b853..29c5d7a26 100644 --- a/waku/waku_api/rest/filter/handlers.nim +++ b/waku/waku_api/rest/filter/handlers.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/strformat, diff --git a/waku/waku_api/rest/filter/types.nim b/waku/waku_api/rest/filter/types.nim index 19b9e71af..a4b69521f 100644 --- a/waku/waku_api/rest/filter/types.nim +++ b/waku/waku_api/rest/filter/types.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sets, strformat], diff --git a/waku/waku_api/rest/health/client.nim b/waku/waku_api/rest/health/client.nim index 834230dcc..14215ebbb 100644 --- a/waku/waku_api/rest/health/client.nim +++ b/waku/waku_api/rest/health/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, json_serialization, json_serialization/std/options, presto/[route, client] diff --git a/waku/waku_api/rest/health/handlers.nim b/waku/waku_api/rest/health/handlers.nim index d82e46fc8..48dad9276 100644 --- a/waku/waku_api/rest/health/handlers.nim +++ b/waku/waku_api/rest/health/handlers.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, json_serialization, presto/route import ../../../waku_node, ../responses, ../serdes, ./types diff --git a/waku/waku_api/rest/health/types.nim b/waku/waku_api/rest/health/types.nim index a4f966467..db76f5b8c 100644 --- a/waku/waku_api/rest/health/types.nim +++ b/waku/waku_api/rest/health/types.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, json_serialization, json_serialization/std/options import ../../../waku_node, ../serdes diff --git a/waku/waku_api/rest/legacy_store/client.nim b/waku/waku_api/rest/legacy_store/client.nim index fa85b9b2e..24ad38d9a 100644 --- a/waku/waku_api/rest/legacy_store/client.nim +++ b/waku/waku_api/rest/legacy_store/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, json_serialization, json_serialization/std/options, presto/[route, client] diff --git a/waku/waku_api/rest/legacy_store/handlers.nim b/waku/waku_api/rest/legacy_store/handlers.nim index b05ece356..680e8c782 100644 --- a/waku/waku_api/rest/legacy_store/handlers.nim +++ b/waku/waku_api/rest/legacy_store/handlers.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/strformat, stew/results, chronicles, uri, json_serialization, presto/route import diff --git a/waku/waku_api/rest/legacy_store/types.nim b/waku/waku_api/rest/legacy_store/types.nim index c05335e9c..0ae36e05e 100644 --- a/waku/waku_api/rest/legacy_store/types.nim +++ b/waku/waku_api/rest/legacy_store/types.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sets, strformat, uri], diff --git a/waku/waku_api/rest/lightpush/client.nim b/waku/waku_api/rest/lightpush/client.nim index 4c18175a4..3e7f85524 100644 --- a/waku/waku_api/rest/lightpush/client.nim +++ b/waku/waku_api/rest/lightpush/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import json, diff --git a/waku/waku_api/rest/lightpush/handlers.nim b/waku/waku_api/rest/lightpush/handlers.nim index 83b15c098..3692d118e 100644 --- a/waku/waku_api/rest/lightpush/handlers.nim +++ b/waku/waku_api/rest/lightpush/handlers.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/strformat, diff --git a/waku/waku_api/rest/lightpush/types.nim b/waku/waku_api/rest/lightpush/types.nim index e25a41c59..3d8d0715f 100644 --- a/waku/waku_api/rest/lightpush/types.nim +++ b/waku/waku_api/rest/lightpush/types.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sets, strformat], diff --git a/waku/waku_api/rest/origin_handler.nim b/waku/waku_api/rest/origin_handler.nim index 1825b030d..3cedfa26d 100644 --- a/waku/waku_api/rest/origin_handler.nim +++ b/waku/waku_api/rest/origin_handler.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, strutils, re, net], diff --git a/waku/waku_api/rest/relay/client.nim b/waku/waku_api/rest/relay/client.nim index c6f58fa95..5e72bb609 100644 --- a/waku/waku_api/rest/relay/client.nim +++ b/waku/waku_api/rest/relay/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/sets, diff --git a/waku/waku_api/rest/relay/handlers.nim b/waku/waku_api/rest/relay/handlers.nim index a3abfe431..1f8563ab6 100644 --- a/waku/waku_api/rest/relay/handlers.nim +++ b/waku/waku_api/rest/relay/handlers.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/sequtils, diff --git a/waku/waku_api/rest/relay/types.nim b/waku/waku_api/rest/relay/types.nim index c39ea683a..98957c747 100644 --- a/waku/waku_api/rest/relay/types.nim +++ b/waku/waku_api/rest/relay/types.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sets, strformat, times], diff --git a/waku/waku_api/rest/responses.nim b/waku/waku_api/rest/responses.nim index 105c7423d..ace6cd2d4 100644 --- a/waku/waku_api/rest/responses.nim +++ b/waku/waku_api/rest/responses.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/typetraits, stew/results, chronicles, presto/common import ./serdes diff --git a/waku/waku_api/rest/rest_serdes.nim b/waku/waku_api/rest/rest_serdes.nim index 0e2ee77a9..a68144b6e 100644 --- a/waku/waku_api/rest/rest_serdes.nim +++ b/waku/waku_api/rest/rest_serdes.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/typetraits, diff --git a/waku/waku_api/rest/serdes.nim b/waku/waku_api/rest/serdes.nim index 54be180d5..bb75fbfde 100644 --- a/waku/waku_api/rest/serdes.nim +++ b/waku/waku_api/rest/serdes.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/typetraits, diff --git a/waku/waku_api/rest/server.nim b/waku/waku_api/rest/server.nim index 7e27c0cd5..b2e797e2a 100644 --- a/waku/waku_api/rest/server.nim +++ b/waku/waku_api/rest/server.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/net import diff --git a/waku/waku_api/rest/store/client.nim b/waku/waku_api/rest/store/client.nim index 90fab2f57..887279cef 100644 --- a/waku/waku_api/rest/store/client.nim +++ b/waku/waku_api/rest/store/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, json_serialization, json_serialization/std/options, presto/[route, client] diff --git a/waku/waku_api/rest/store/handlers.nim b/waku/waku_api/rest/store/handlers.nim index 23817118b..b37bc691d 100644 --- a/waku/waku_api/rest/store/handlers.nim +++ b/waku/waku_api/rest/store/handlers.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/strformat, stew/results, chronicles, uri, json_serialization, presto/route import diff --git a/waku/waku_api/rest/store/types.nim b/waku/waku_api/rest/store/types.nim index 872d0ce59..a3db8fbaa 100644 --- a/waku/waku_api/rest/store/types.nim +++ b/waku/waku_api/rest/store/types.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sets, strformat, uri, options, sequtils], diff --git a/waku/waku_archive/archive.nim b/waku/waku_archive/archive.nim index d32e7c335..70caf78cc 100644 --- a/waku/waku_archive/archive.nim +++ b/waku/waku_archive/archive.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[times, options, sequtils, strutils, algorithm], diff --git a/waku/waku_archive/archive_metrics.nim b/waku/waku_archive/archive_metrics.nim index 08b15b0a6..fd39f923e 100644 --- a/waku/waku_archive/archive_metrics.nim +++ b/waku/waku_archive/archive_metrics.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import metrics diff --git a/waku/waku_archive/common.nim b/waku/waku_archive/common.nim index 5b14fb111..427a30c51 100644 --- a/waku/waku_archive/common.nim +++ b/waku/waku_archive/common.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, stew/results, stew/byteutils, stew/arrayops, nimcrypto/sha2 import ../waku_core, ../common/paging diff --git a/waku/waku_archive/driver.nim b/waku/waku_archive/driver.nim index 235c4b8a7..c17b58d2c 100644 --- a/waku/waku_archive/driver.nim +++ b/waku/waku_archive/driver.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, stew/results, chronos import ../waku_core, ./common diff --git a/waku/waku_archive/driver/builder.nim b/waku/waku_archive/driver/builder.nim index 1768774d2..b16578952 100644 --- a/waku/waku_archive/driver/builder.nim +++ b/waku/waku_archive/driver/builder.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results, chronicles, chronos import diff --git a/waku/waku_archive/driver/postgres_driver.nim b/waku/waku_archive/driver/postgres_driver.nim index a106eb2c4..1da5156d5 100644 --- a/waku/waku_archive/driver/postgres_driver.nim +++ b/waku/waku_archive/driver/postgres_driver.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ./postgres_driver/postgres_driver, diff --git a/waku/waku_archive/driver/postgres_driver/postgres_driver.nim b/waku/waku_archive/driver/postgres_driver/postgres_driver.nim index 516d8d70e..ffa33faaf 100644 --- a/waku/waku_archive/driver/postgres_driver/postgres_driver.nim +++ b/waku/waku_archive/driver/postgres_driver/postgres_driver.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[nre, options, sequtils, strutils, strformat, times], diff --git a/waku/waku_archive/driver/postgres_driver/postgres_healthcheck.nim b/waku/waku_archive/driver/postgres_driver/postgres_healthcheck.nim index cb918f7fd..b6a59a3ad 100644 --- a/waku/waku_archive/driver/postgres_driver/postgres_healthcheck.nim +++ b/waku/waku_archive/driver/postgres_driver/postgres_healthcheck.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronos, stew/results import ../../../common/databases/db_postgres, ../../../common/error_handling diff --git a/waku/waku_archive/driver/queue_driver.nim b/waku/waku_archive/driver/queue_driver.nim index 1ea8a29d3..df7573780 100644 --- a/waku/waku_archive/driver/queue_driver.nim +++ b/waku/waku_archive/driver/queue_driver.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ./queue_driver/queue_driver, ./queue_driver/index diff --git a/waku/waku_archive/driver/queue_driver/index.nim b/waku/waku_archive/driver/queue_driver/index.nim index d34b550c8..22e612aab 100644 --- a/waku/waku_archive/driver/queue_driver/index.nim +++ b/waku/waku_archive/driver/queue_driver/index.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/byteutils, nimcrypto/sha2 import ../../../waku_core, ../../common diff --git a/waku/waku_archive/driver/queue_driver/queue_driver.nim b/waku/waku_archive/driver/queue_driver/queue_driver.nim index dcc45f970..8340ad850 100644 --- a/waku/waku_archive/driver/queue_driver/queue_driver.nim +++ b/waku/waku_archive/driver/queue_driver/queue_driver.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, stew/results, stew/sorted_set, chronicles, chronos import ../../../waku_core, ../../common, ../../driver, ./index diff --git a/waku/waku_archive/driver/sqlite_driver.nim b/waku/waku_archive/driver/sqlite_driver.nim index 027e00488..da46f6c84 100644 --- a/waku/waku_archive/driver/sqlite_driver.nim +++ b/waku/waku_archive/driver/sqlite_driver.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ./sqlite_driver/sqlite_driver diff --git a/waku/waku_archive/driver/sqlite_driver/cursor.nim b/waku/waku_archive/driver/sqlite_driver/cursor.nim index 9729f0ff7..ada14cc24 100644 --- a/waku/waku_archive/driver/sqlite_driver/cursor.nim +++ b/waku/waku_archive/driver/sqlite_driver/cursor.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ../../../waku_core, ../../common diff --git a/waku/waku_archive/driver/sqlite_driver/queries.nim b/waku/waku_archive/driver/sqlite_driver/queries.nim index 94f323b2d..037dddd80 100644 --- a/waku/waku_archive/driver/sqlite_driver/queries.nim +++ b/waku/waku_archive/driver/sqlite_driver/queries.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, sequtils], stew/[results, byteutils], sqlite3_abi import diff --git a/waku/waku_archive/driver/sqlite_driver/sqlite_driver.nim b/waku/waku_archive/driver/sqlite_driver/sqlite_driver.nim index e9072ceef..e9902fcca 100644 --- a/waku/waku_archive/driver/sqlite_driver/sqlite_driver.nim +++ b/waku/waku_archive/driver/sqlite_driver/sqlite_driver.nim @@ -1,9 +1,6 @@ # The code in this file is an adaptation of the Sqlite KV Store found in nim-eth. # https://github.com/status-im/nim-eth/blob/master/eth/db/kvstore_sqlite3.nim -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, stew/[byteutils, results], chronicles, chronos import diff --git a/waku/waku_archive/retention_policy.nim b/waku/waku_archive/retention_policy.nim index dde2fede4..0c92caba3 100644 --- a/waku/waku_archive/retention_policy.nim +++ b/waku/waku_archive/retention_policy.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results, chronos import ./driver diff --git a/waku/waku_archive/retention_policy/builder.nim b/waku/waku_archive/retention_policy/builder.nim index 98d9cf1a5..6ed50a4ac 100644 --- a/waku/waku_archive/retention_policy/builder.nim +++ b/waku/waku_archive/retention_policy/builder.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[strutils, options], regex, stew/results import diff --git a/waku/waku_archive/retention_policy/retention_policy_capacity.nim b/waku/waku_archive/retention_policy/retention_policy_capacity.nim index 0e5066256..b29ca6531 100644 --- a/waku/waku_archive/retention_policy/retention_policy_capacity.nim +++ b/waku/waku_archive/retention_policy/retention_policy_capacity.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results, chronicles, chronos import ../driver, ../retention_policy diff --git a/waku/waku_archive/retention_policy/retention_policy_size.nim b/waku/waku_archive/retention_policy/retention_policy_size.nim index a01ebfcf0..2e09e197f 100644 --- a/waku/waku_archive/retention_policy/retention_policy_size.nim +++ b/waku/waku_archive/retention_policy/retention_policy_size.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results, chronicles, chronos import ../driver, ../retention_policy diff --git a/waku/waku_archive/retention_policy/retention_policy_time.nim b/waku/waku_archive/retention_policy/retention_policy_time.nim index a63a040e9..2a3d1de4b 100644 --- a/waku/waku_archive/retention_policy/retention_policy_time.nim +++ b/waku/waku_archive/retention_policy/retention_policy_time.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/times, stew/results, chronicles, chronos import ../../waku_core, ../driver, ../retention_policy diff --git a/waku/waku_core/message/codec.nim b/waku/waku_core/message/codec.nim index 7b71d9538..9b01cf667 100644 --- a/waku/waku_core/message/codec.nim +++ b/waku/waku_core/message/codec.nim @@ -2,10 +2,7 @@ # See: # - RFC 14: https://rfc.vac.dev/spec/14/ # - Proto definition: https://github.com/vacp2p/waku/blob/main/waku/message/v1/message.proto -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ../../common/protobuf, ../topics, ../time, ./message diff --git a/waku/waku_core/message/digest.nim b/waku/waku_core/message/digest.nim index 67e8d81c2..1d4d12281 100644 --- a/waku/waku_core/message/digest.nim +++ b/waku/waku_core/message/digest.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/sequtils, stew/[byteutils, endians2, arrayops], nimcrypto/sha2 import ../topics, ./message diff --git a/waku/waku_core/message/message.nim b/waku/waku_core/message/message.nim index d96ac4996..acd7055a0 100644 --- a/waku/waku_core/message/message.nim +++ b/waku/waku_core/message/message.nim @@ -3,10 +3,7 @@ ## See https://github.com/vacp2p/specs/blob/master/specs/waku/v2/waku-message.md ## for spec. -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ../topics, ../time diff --git a/waku/waku_core/multiaddrstr.nim b/waku/waku_core/multiaddrstr.nim index 46654cbc0..cd0caf2aa 100644 --- a/waku/waku_core/multiaddrstr.nim +++ b/waku/waku_core/multiaddrstr.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import libp2p/[peerinfo, switch] diff --git a/waku/waku_core/peers.nim b/waku/waku_core/peers.nim index d44e89cd9..ead73014b 100644 --- a/waku/waku_core/peers.nim +++ b/waku/waku_core/peers.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, sequtils, strutils, uri, net], diff --git a/waku/waku_core/subscription/push_handler.nim b/waku/waku_core/subscription/push_handler.nim index a33668152..139f13445 100644 --- a/waku/waku_core/subscription/push_handler.nim +++ b/waku/waku_core/subscription/push_handler.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronos diff --git a/waku/waku_core/subscription/subscription_manager.nim b/waku/waku_core/subscription/subscription_manager.nim index fe1f0a096..18af7fd95 100644 --- a/waku/waku_core/subscription/subscription_manager.nim +++ b/waku/waku_core/subscription/subscription_manager.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/tables, stew/results, chronicles, chronos diff --git a/waku/waku_core/time.nim b/waku/waku_core/time.nim index 10b937ab3..c8aa56355 100644 --- a/waku/waku_core/time.nim +++ b/waku/waku_core/time.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/times, metrics diff --git a/waku/waku_core/topics/content_topic.nim b/waku/waku_core/topics/content_topic.nim index 8820da471..bd7b5782a 100644 --- a/waku/waku_core/topics/content_topic.nim +++ b/waku/waku_core/topics/content_topic.nim @@ -2,10 +2,7 @@ ## ## See 23/WAKU2-TOPICS RFC: https://rfc.vac.dev/spec/23/ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, std/strutils, stew/results import ./parsing diff --git a/waku/waku_core/topics/parsing.nim b/waku/waku_core/topics/parsing.nim index 300037ea7..47a8979a8 100644 --- a/waku/waku_core/topics/parsing.nim +++ b/waku/waku_core/topics/parsing.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results diff --git a/waku/waku_core/topics/pubsub_topic.nim b/waku/waku_core/topics/pubsub_topic.nim index 553b9c9ba..516d093bf 100644 --- a/waku/waku_core/topics/pubsub_topic.nim +++ b/waku/waku_core/topics/pubsub_topic.nim @@ -2,10 +2,7 @@ ## ## See 23/WAKU2-TOPICS RFC: https://rfc.vac.dev/spec/23/ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/strutils, stew/[results, base10] import ./parsing diff --git a/waku/waku_core/topics/sharding.nim b/waku/waku_core/topics/sharding.nim index 5517af9ff..c2bf63301 100644 --- a/waku/waku_core/topics/sharding.nim +++ b/waku/waku_core/topics/sharding.nim @@ -2,10 +2,7 @@ ## ## See 51/WAKU2-RELAY-SHARDING RFC: https://rfc.vac.dev/spec/51/#automatic-sharding -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import nimcrypto, std/options, std/tables, stew/endians2, stew/results, stew/byteutils diff --git a/waku/waku_enr/capabilities.nim b/waku/waku_enr/capabilities.nim index 171bce18f..fb434e8ce 100644 --- a/waku/waku_enr/capabilities.nim +++ b/waku/waku_enr/capabilities.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, bitops, sequtils, net], stew/results, eth/keys, libp2p/crypto/crypto diff --git a/waku/waku_enr/multiaddr.nim b/waku/waku_enr/multiaddr.nim index 0ae50e883..4c815a22b 100644 --- a/waku/waku_enr/multiaddr.nim +++ b/waku/waku_enr/multiaddr.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, sequtils, net], diff --git a/waku/waku_enr/sharding.nim b/waku/waku_enr/sharding.nim index 3f0774a4e..fd7ab939a 100644 --- a/waku/waku_enr/sharding.nim +++ b/waku/waku_enr/sharding.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, bitops, sequtils, net], diff --git a/waku/waku_filter_v2/client.nim b/waku/waku_filter_v2/client.nim index e20aeaef3..6823972b2 100644 --- a/waku/waku_filter_v2/client.nim +++ b/waku/waku_filter_v2/client.nim @@ -1,9 +1,6 @@ ## Waku Filter client for subscribing and receiving filtered messages -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, chronicles, chronos, libp2p/protocols/protocol, bearssl/rand import diff --git a/waku/waku_filter_v2/common.nim b/waku/waku_filter_v2/common.nim index ad5c7f21d..7d2a4ad0a 100644 --- a/waku/waku_filter_v2/common.nim +++ b/waku/waku_filter_v2/common.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results diff --git a/waku/waku_filter_v2/protocol.nim b/waku/waku_filter_v2/protocol.nim index 5d5b0a6e4..b3e1516ea 100644 --- a/waku/waku_filter_v2/protocol.nim +++ b/waku/waku_filter_v2/protocol.nim @@ -1,9 +1,6 @@ ## Waku Filter protocol for subscribing and filtering messages -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, sequtils, sets, strutils, tables], diff --git a/waku/waku_filter_v2/protocol_metrics.nim b/waku/waku_filter_v2/protocol_metrics.nim index bb30d51a1..b19f612f3 100644 --- a/waku/waku_filter_v2/protocol_metrics.nim +++ b/waku/waku_filter_v2/protocol_metrics.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import metrics diff --git a/waku/waku_filter_v2/rpc.nim b/waku/waku_filter_v2/rpc.nim index 1878bffa2..e3ee45880 100644 --- a/waku/waku_filter_v2/rpc.nim +++ b/waku/waku_filter_v2/rpc.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import json_serialization, std/options import ../waku_core diff --git a/waku/waku_filter_v2/rpc_codec.nim b/waku/waku_filter_v2/rpc_codec.nim index 0705e6bc8..94bdb367c 100644 --- a/waku/waku_filter_v2/rpc_codec.nim +++ b/waku/waku_filter_v2/rpc_codec.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options import ../common/protobuf, ../waku_core, ./rpc diff --git a/waku/waku_filter_v2/subscriptions.nim b/waku/waku_filter_v2/subscriptions.nim index 37348025d..61d292eed 100644 --- a/waku/waku_filter_v2/subscriptions.nim +++ b/waku/waku_filter_v2/subscriptions.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sets, tables], chronicles, chronos, libp2p/peerid, stew/shims/sets import ../waku_core, ../utils/tableutils diff --git a/waku/waku_keystore/conversion_utils.nim b/waku/waku_keystore/conversion_utils.nim index 160404651..4aaa6ec3e 100644 --- a/waku/waku_keystore/conversion_utils.nim +++ b/waku/waku_keystore/conversion_utils.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import json, stew/[results, byteutils], ./protocol_types diff --git a/waku/waku_keystore/keyfile.nim b/waku/waku_keystore/keyfile.nim index 58a7ce32a..5ea1aceb9 100644 --- a/waku/waku_keystore/keyfile.nim +++ b/waku/waku_keystore/keyfile.nim @@ -3,10 +3,7 @@ # - allow storage of multiple keyfiles (encrypted with different passwords) in same file and iteration among successful decryptions # - enable/disable at compilation time the keyfile id and version fields -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[os, strutils, json, sequtils], diff --git a/waku/waku_keystore/keystore.nim b/waku/waku_keystore/keystore.nim index 65371c5a7..23dd43e23 100644 --- a/waku/waku_keystore/keystore.nim +++ b/waku/waku_keystore/keystore.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import options, json, strutils, sequtils, std/[tables, os] diff --git a/waku/waku_keystore/protocol_types.nim b/waku/waku_keystore/protocol_types.nim index 2fab64e6f..02934fa78 100644 --- a/waku/waku_keystore/protocol_types.nim +++ b/waku/waku_keystore/protocol_types.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sequtils, tables], stew/[results, endians2], nimcrypto, stint diff --git a/waku/waku_keystore/utils.nim b/waku/waku_keystore/utils.nim index 8bfa104ba..422b96106 100644 --- a/waku/waku_keystore/utils.nim +++ b/waku/waku_keystore/utils.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import json, std/[os, sequtils] diff --git a/waku/waku_lightpush/callbacks.nim b/waku/waku_lightpush/callbacks.nim index 6d4bff3d2..5cc14eb0f 100644 --- a/waku/waku_lightpush/callbacks.nim +++ b/waku/waku_lightpush/callbacks.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ../waku_core, diff --git a/waku/waku_lightpush/client.nim b/waku/waku_lightpush/client.nim index 45c09353f..c419e35e6 100644 --- a/waku/waku_lightpush/client.nim +++ b/waku/waku_lightpush/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, stew/results, chronicles, chronos, metrics, bearssl/rand import diff --git a/waku/waku_lightpush/common.nim b/waku/waku_lightpush/common.nim index 4e376b1ae..dc1ec0578 100644 --- a/waku/waku_lightpush/common.nim +++ b/waku/waku_lightpush/common.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results, chronos, libp2p/peerid import ../waku_core diff --git a/waku/waku_lightpush/protocol.nim b/waku/waku_lightpush/protocol.nim index f0ca0910f..f352bb276 100644 --- a/waku/waku_lightpush/protocol.nim +++ b/waku/waku_lightpush/protocol.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, stew/results, stew/byteutils, chronicles, chronos, metrics, bearssl/rand diff --git a/waku/waku_lightpush/protocol_metrics.nim b/waku/waku_lightpush/protocol_metrics.nim index 8e3b58f9d..7a30f9e70 100644 --- a/waku/waku_lightpush/protocol_metrics.nim +++ b/waku/waku_lightpush/protocol_metrics.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import metrics diff --git a/waku/waku_lightpush/rpc.nim b/waku/waku_lightpush/rpc.nim index da1f123f6..33ba3f5e3 100644 --- a/waku/waku_lightpush/rpc.nim +++ b/waku/waku_lightpush/rpc.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options import ../waku_core diff --git a/waku/waku_lightpush/rpc_codec.nim b/waku/waku_lightpush/rpc_codec.nim index d2e37e495..25d2bd210 100644 --- a/waku/waku_lightpush/rpc_codec.nim +++ b/waku/waku_lightpush/rpc_codec.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options import ../common/protobuf, ../waku_core, ./rpc diff --git a/waku/waku_lightpush/self_req_handler.nim b/waku/waku_lightpush/self_req_handler.nim index b3094f23c..900e1796d 100644 --- a/waku/waku_lightpush/self_req_handler.nim +++ b/waku/waku_lightpush/self_req_handler.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} ## Notice that the REST /lightpush requests normally assume that the node ## is acting as a lightpush-client that will trigger the service provider node diff --git a/waku/waku_metadata.nim b/waku/waku_metadata.nim index 823dae4fa..96380baf2 100644 --- a/waku/waku_metadata.nim +++ b/waku/waku_metadata.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ./waku_metadata/protocol diff --git a/waku/waku_metadata/protocol.nim b/waku/waku_metadata/protocol.nim index 0608be6d5..8ecfc3cbf 100644 --- a/waku/waku_metadata/protocol.nim +++ b/waku/waku_metadata/protocol.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, sequtils, sets], diff --git a/waku/waku_metadata/rpc.nim b/waku/waku_metadata/rpc.nim index 12ab873ac..fcb11e57d 100644 --- a/waku/waku_metadata/rpc.nim +++ b/waku/waku_metadata/rpc.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options diff --git a/waku/waku_noise/noise.nim b/waku/waku_noise/noise.nim index dc0434500..b464b0edb 100644 --- a/waku/waku_noise/noise.nim +++ b/waku/waku_noise/noise.nim @@ -6,10 +6,7 @@ ## Implementation partially inspired by noise-libp2p: ## https://github.com/status-im/nim-libp2p/blob/master/libp2p/protocols/secure/noise.nim -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, strutils] import stew/byteutils diff --git a/waku/waku_noise/noise_handshake_processing.nim b/waku/waku_noise/noise_handshake_processing.nim index a5b0dbc63..328d45c66 100644 --- a/waku/waku_noise/noise_handshake_processing.nim +++ b/waku/waku_noise/noise_handshake_processing.nim @@ -2,10 +2,7 @@ ## See spec for more details: ## https://github.com/vacp2p/rfc/tree/master/content/docs/rfcs/35 -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, strutils, tables] import chronos diff --git a/waku/waku_noise/noise_types.nim b/waku/waku_noise/noise_types.nim index 33e8a2db0..3d288a242 100644 --- a/waku/waku_noise/noise_types.nim +++ b/waku/waku_noise/noise_types.nim @@ -5,10 +5,7 @@ ## Implementation partially inspired by noise-libp2p: ## https://github.com/status-im/nim-libp2p/blob/master/libp2p/protocols/secure/noise.nim -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, tables] import chronos diff --git a/waku/waku_noise/noise_utils.nim b/waku/waku_noise/noise_utils.nim index 23201f965..a612c0728 100644 --- a/waku/waku_noise/noise_utils.nim +++ b/waku/waku_noise/noise_utils.nim @@ -3,10 +3,7 @@ ## See spec for more details: ## https://github.com/vacp2p/rfc/tree/master/content/docs/rfcs/35 -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[algorithm, base64, oids, options, strutils, tables, sequtils] import chronos diff --git a/waku/waku_peer_exchange.nim b/waku/waku_peer_exchange.nim index b28263a5e..ca707f162 100644 --- a/waku/waku_peer_exchange.nim +++ b/waku/waku_peer_exchange.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ./waku_peer_exchange/protocol diff --git a/waku/waku_peer_exchange/rpc_codec.nim b/waku/waku_peer_exchange/rpc_codec.nim index 8d4086106..92ebd7084 100644 --- a/waku/waku_peer_exchange/rpc_codec.nim +++ b/waku/waku_peer_exchange/rpc_codec.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import ../common/protobuf, ./rpc diff --git a/waku/waku_relay/message_id.nim b/waku/waku_relay/message_id.nim index 83a70624d..2b86411ca 100644 --- a/waku/waku_relay/message_id.nim +++ b/waku/waku_relay/message_id.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import stew/results, diff --git a/waku/waku_relay/protocol.nim b/waku/waku_relay/protocol.nim index e52ef8542..5baf2ce8c 100644 --- a/waku/waku_relay/protocol.nim +++ b/waku/waku_relay/protocol.nim @@ -2,10 +2,7 @@ ## ## See https://github.com/vacp2p/specs/blob/master/specs/waku/v2/waku-relay.md ## for spec. -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/strformat, diff --git a/waku/waku_rln_relay/conversion_utils.nim b/waku/waku_rln_relay/conversion_utils.nim index afdae614d..f6ce81bda 100644 --- a/waku/waku_rln_relay/conversion_utils.nim +++ b/waku/waku_rln_relay/conversion_utils.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sequtils, strutils, algorithm], diff --git a/waku/waku_rln_relay/group_manager/on_chain/group_manager.nim b/waku/waku_rln_relay/group_manager/on_chain/group_manager.nim index a83ae9bb3..1d9935c54 100644 --- a/waku/waku_rln_relay/group_manager/on_chain/group_manager.nim +++ b/waku/waku_rln_relay/group_manager/on_chain/group_manager.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import os, diff --git a/waku/waku_rln_relay/nonce_manager.nim b/waku/waku_rln_relay/nonce_manager.nim index 6fe463ce1..490713d20 100644 --- a/waku/waku_rln_relay/nonce_manager.nim +++ b/waku/waku_rln_relay/nonce_manager.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronos, stew/results, times import ./constants diff --git a/waku/waku_rln_relay/protocol_metrics.nim b/waku/waku_rln_relay/protocol_metrics.nim index d53caad2a..6afb448f0 100644 --- a/waku/waku_rln_relay/protocol_metrics.nim +++ b/waku/waku_rln_relay/protocol_metrics.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import chronicles, diff --git a/waku/waku_rln_relay/protocol_types.nim b/waku/waku_rln_relay/protocol_types.nim index 7fa392247..17db65d90 100644 --- a/waku/waku_rln_relay/protocol_types.nim +++ b/waku/waku_rln_relay/protocol_types.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, tables, deques], stew/arrayops, stint, chronos, web3, eth/keys import ../waku_core, ../waku_keystore, ../common/protobuf diff --git a/waku/waku_rln_relay/rln/rln_interface.nim b/waku/waku_rln_relay/rln/rln_interface.nim index 54af6a3b6..cc468b124 100644 --- a/waku/waku_rln_relay/rln/rln_interface.nim +++ b/waku/waku_rln_relay/rln/rln_interface.nim @@ -1,10 +1,7 @@ ## Nim wrappers for the functions defined in librln import ../protocol_types -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} ## Buffer struct is taken from # https://github.com/celo-org/celo-threshold-bls-rs/blob/master/crates/threshold-bls-ffi/src/ffi.rs diff --git a/waku/waku_rln_relay/rln_relay.nim b/waku/waku_rln_relay/rln_relay.nim index 139c7aaf9..e4aeb9552 100644 --- a/waku/waku_rln_relay/rln_relay.nim +++ b/waku/waku_rln_relay/rln_relay.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[sequtils, tables, times, deques], diff --git a/waku/waku_store/client.nim b/waku/waku_store/client.nim index 4f378ddbc..10abbb8e0 100644 --- a/waku/waku_store/client.nim +++ b/waku/waku_store/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, stew/results, chronicles, chronos, metrics, bearssl/rand import diff --git a/waku/waku_store/common.nim b/waku/waku_store/common.nim index f1e6a78bc..bd6ccb337 100644 --- a/waku/waku_store/common.nim +++ b/waku/waku_store/common.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options], stew/results import ../waku_core, ../common/paging diff --git a/waku/waku_store/protocol.nim b/waku/waku_store/protocol.nim index 57ac221b0..e91acb207 100644 --- a/waku/waku_store/protocol.nim +++ b/waku/waku_store/protocol.nim @@ -1,10 +1,7 @@ ## Waku Store protocol for historical messaging support. ## See spec for more details: ## https://github.com/vacp2p/specs/blob/master/specs/waku/v2/waku-store.md -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, diff --git a/waku/waku_store/protocol_metrics.nim b/waku/waku_store/protocol_metrics.nim index 1566841f9..d413c0a67 100644 --- a/waku/waku_store/protocol_metrics.nim +++ b/waku/waku_store/protocol_metrics.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import metrics diff --git a/waku/waku_store/rpc_codec.nim b/waku/waku_store/rpc_codec.nim index 5f3f65dff..a5e5e2d0b 100644 --- a/waku/waku_store/rpc_codec.nim +++ b/waku/waku_store/rpc_codec.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, stew/arrayops import ../common/[protobuf, paging], ../waku_core, ./common diff --git a/waku/waku_store_legacy/client.nim b/waku/waku_store_legacy/client.nim index 9f72ed3fc..f8eea5ceb 100644 --- a/waku/waku_store_legacy/client.nim +++ b/waku/waku_store_legacy/client.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, stew/results, chronicles, chronos, metrics, bearssl/rand import diff --git a/waku/waku_store_legacy/common.nim b/waku/waku_store_legacy/common.nim index 0de36fe19..004855584 100644 --- a/waku/waku_store_legacy/common.nim +++ b/waku/waku_store_legacy/common.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, sequtils], stew/results, stew/byteutils, nimcrypto/sha2 import ../waku_core, ../common/paging diff --git a/waku/waku_store_legacy/protocol.nim b/waku/waku_store_legacy/protocol.nim index 4df4520c6..2c552634b 100644 --- a/waku/waku_store_legacy/protocol.nim +++ b/waku/waku_store_legacy/protocol.nim @@ -1,10 +1,7 @@ ## Waku Store protocol for historical messaging support. ## See spec for more details: ## https://github.com/vacp2p/specs/blob/master/specs/waku/v2/waku-store.md -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, diff --git a/waku/waku_store_legacy/protocol_metrics.nim b/waku/waku_store_legacy/protocol_metrics.nim index d85415023..59c7a829a 100644 --- a/waku/waku_store_legacy/protocol_metrics.nim +++ b/waku/waku_store_legacy/protocol_metrics.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import metrics diff --git a/waku/waku_store_legacy/rpc.nim b/waku/waku_store_legacy/rpc.nim index 9a8887aee..fad177d3f 100644 --- a/waku/waku_store_legacy/rpc.nim +++ b/waku/waku_store_legacy/rpc.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/[options, sequtils], stew/results import ../waku_core, ../common/paging, ./common diff --git a/waku/waku_store_legacy/rpc_codec.nim b/waku/waku_store_legacy/rpc_codec.nim index 2d5867e00..f9c518e83 100644 --- a/waku/waku_store_legacy/rpc_codec.nim +++ b/waku/waku_store_legacy/rpc_codec.nim @@ -1,7 +1,4 @@ -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import std/options, nimcrypto/hash import ../common/[protobuf, paging], ../waku_core, ./common, ./rpc