mirror of
https://github.com/waku-org/nwaku.git
synced 2025-02-14 16:07:27 +00:00
deploy: 0de5a122ef231ab399ba9b07122e1bce4162a0e6
This commit is contained in:
parent
0c838f2a7b
commit
cca6125490
@ -18,13 +18,14 @@ import
|
||||
libp2p/transports/[transport, wstransport],
|
||||
libp2p/nameresolving/dnsresolver
|
||||
import
|
||||
../../waku/common/sqlite,
|
||||
../../waku/common/utils/nat,
|
||||
../../waku/v2/protocol/waku_store,
|
||||
../../waku/v2/protocol/waku_filter,
|
||||
../../waku/v2/protocol/waku_peer_exchange,
|
||||
../../waku/v2/node/peer_manager/peer_manager,
|
||||
../../waku/v2/node/dnsdisc/waku_dnsdisc,
|
||||
../../waku/v2/node/discv5/waku_discv5,
|
||||
../../waku/v2/node/storage/sqlite,
|
||||
../../waku/v2/node/storage/migration,
|
||||
../../waku/v2/node/storage/peer/waku_peer_storage,
|
||||
../../waku/v2/node/storage/message/waku_store_queue,
|
||||
@ -37,7 +38,6 @@ import
|
||||
../../waku/v2/node/waku_metrics,
|
||||
../../waku/v2/utils/peers,
|
||||
../../waku/v2/utils/wakuenr,
|
||||
../../waku/common/utils/nat,
|
||||
./wakunode2_setup_rest,
|
||||
./wakunode2_setup_rpc,
|
||||
./config
|
||||
|
@ -1,15 +1,14 @@
|
||||
{.used.}
|
||||
|
||||
import
|
||||
std/[unittest, options, tables, sets, times, strutils, sequtils, os],
|
||||
std/[unittest, options, sequtils],
|
||||
stew/byteutils,
|
||||
chronos,
|
||||
chronicles
|
||||
chronos
|
||||
import
|
||||
../../waku/common/sqlite,
|
||||
../../waku/v2/node/storage/message/sqlite_store,
|
||||
../../waku/v2/node/storage/message/message_retention_policy,
|
||||
../../waku/v2/node/storage/message/message_retention_policy_capacity,
|
||||
../../waku/v2/node/storage/sqlite,
|
||||
../../waku/v2/protocol/waku_message,
|
||||
../../waku/v2/protocol/waku_store/pagination,
|
||||
../../waku/v2/utils/time,
|
||||
|
@ -1,16 +1,14 @@
|
||||
{.used.}
|
||||
|
||||
import
|
||||
std/[options, tables, sets, strutils, sequtils, algorithm],
|
||||
std/[options, sequtils, algorithm],
|
||||
unittest2,
|
||||
chronos,
|
||||
chronicles
|
||||
chronos
|
||||
import
|
||||
../../waku/common/sqlite,
|
||||
../../waku/v2/node/storage/message/sqlite_store,
|
||||
../../waku/v2/node/storage/sqlite,
|
||||
../../waku/v2/protocol/waku_message,
|
||||
../../waku/v2/protocol/waku_store/pagination,
|
||||
../../waku/v2/utils/time,
|
||||
./utils,
|
||||
./testlib/common
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
{.used.}
|
||||
|
||||
import
|
||||
std/[options, sets, tables, sequtils],
|
||||
std/[options, tables, sequtils],
|
||||
stew/shims/net as stewNet,
|
||||
chronicles,
|
||||
testutils/unittests, stew/shims/net as stewNet,
|
||||
testutils/unittests,
|
||||
json_rpc/[rpcserver, rpcclient],
|
||||
eth/[keys, rlp], eth/common/eth_types,
|
||||
eth/keys,
|
||||
eth/common/eth_types,
|
||||
libp2p/[builders, switch, multiaddress],
|
||||
libp2p/protobuf/minprotobuf,
|
||||
libp2p/stream/[bufferstream, connection],
|
||||
@ -13,14 +15,15 @@ import
|
||||
libp2p/protocols/pubsub/pubsub,
|
||||
libp2p/protocols/pubsub/rpc/message
|
||||
import
|
||||
../../waku/common/sqlite,
|
||||
../../waku/v2/node/peer_manager/peer_manager,
|
||||
../../waku/v2/node/storage/peer/waku_peer_storage,
|
||||
../../waku/v2/node/waku_node,
|
||||
../../waku/v2/protocol/waku_message,
|
||||
../../waku/v2/protocol/waku_relay,
|
||||
../../waku/v2/protocol/waku_store,
|
||||
../../waku/v2/protocol/waku_filter,
|
||||
../../waku/v2/protocol/waku_swap/waku_swap,
|
||||
../../waku/v2/node/peer_manager/peer_manager,
|
||||
../../waku/v2/node/storage/peer/waku_peer_storage,
|
||||
../../waku/v2/node/waku_node,
|
||||
../test_helpers
|
||||
|
||||
procSuite "Peer Manager":
|
||||
@ -172,7 +175,7 @@ procSuite "Peer Manager":
|
||||
|
||||
asyncTest "Peer manager can use persistent storage and survive restarts":
|
||||
let
|
||||
database = SqliteDatabase.init("1", inMemory = true)[]
|
||||
database = SqliteDatabase.new(":memory:")[]
|
||||
storage = WakuPeerStorage.new(database)[]
|
||||
nodeKey1 = crypto.PrivateKey.random(Secp256k1, rng[])[]
|
||||
node1 = WakuNode.new(nodeKey1, ValidIpAddress.init("0.0.0.0"),
|
||||
@ -220,7 +223,7 @@ procSuite "Peer Manager":
|
||||
|
||||
asyncTest "Peer manager support multiple protocol IDs when reconnecting to peers":
|
||||
let
|
||||
database = SqliteDatabase.init("2", inMemory = true)[]
|
||||
database = SqliteDatabase.new(":memory:")[]
|
||||
storage = WakuPeerStorage.new(database)[]
|
||||
nodeKey1 = crypto.PrivateKey.random(Secp256k1, rng[])[]
|
||||
node1 = WakuNode.new(nodeKey1, ValidIpAddress.init("0.0.0.0"),
|
||||
|
@ -4,6 +4,7 @@ import
|
||||
std/[unittest, sets],
|
||||
libp2p/crypto/crypto
|
||||
import
|
||||
../../waku/common/sqlite,
|
||||
../../waku/v2/node/peer_manager/peer_manager,
|
||||
../../waku/v2/node/storage/peer/waku_peer_storage,
|
||||
../test_helpers
|
||||
|
@ -8,20 +8,20 @@ import
|
||||
chronicles,
|
||||
libp2p/crypto/crypto
|
||||
import
|
||||
../../waku/v2/protocol/waku_message,
|
||||
../../waku/v2/protocol/waku_store,
|
||||
../../waku/v2/protocol/waku_store/client,
|
||||
../../waku/v2/node/storage/sqlite,
|
||||
../../waku/common/sqlite,
|
||||
../../waku/v2/node/storage/message/waku_store_queue,
|
||||
../../waku/v2/node/storage/message/sqlite_store,
|
||||
../../waku/v2/node/peer_manager/peer_manager,
|
||||
../../waku/v2/protocol/waku_message,
|
||||
../../waku/v2/protocol/waku_store,
|
||||
../../waku/v2/protocol/waku_store/client,
|
||||
../../waku/v2/utils/time,
|
||||
./testlib/common,
|
||||
./testlib/switch
|
||||
|
||||
|
||||
proc newTestDatabase(): SqliteDatabase =
|
||||
SqliteDatabase.init("", inMemory = true).tryGet()
|
||||
SqliteDatabase.new(":memory:").tryGet()
|
||||
|
||||
proc newTestMessageStore(): MessageStore =
|
||||
let database = newTestDatabase()
|
||||
|
@ -1,25 +1,25 @@
|
||||
{.used.}
|
||||
|
||||
import
|
||||
std/[options, tables, sets],
|
||||
std/[options, tables],
|
||||
testutils/unittests,
|
||||
chronos,
|
||||
chronicles,
|
||||
libp2p/crypto/crypto
|
||||
import
|
||||
../../waku/common/sqlite,
|
||||
../../waku/v2/node/storage/message/sqlite_store,
|
||||
../../waku/v2/node/peer_manager/peer_manager,
|
||||
../../waku/v2/protocol/waku_message,
|
||||
../../waku/v2/protocol/waku_store,
|
||||
../../waku/v2/protocol/waku_store/client,
|
||||
../../waku/v2/protocol/waku_store/protocol_metrics,
|
||||
../../waku/v2/node/storage/sqlite,
|
||||
../../waku/v2/node/storage/message/sqlite_store,
|
||||
../../waku/v2/node/peer_manager/peer_manager,
|
||||
./testlib/common,
|
||||
./testlib/switch
|
||||
|
||||
|
||||
proc newTestDatabase(): SqliteDatabase =
|
||||
SqliteDatabase.init("", inMemory = true).tryGet()
|
||||
SqliteDatabase.new(":memory:").tryGet()
|
||||
|
||||
proc newTestStore(): MessageStore =
|
||||
let database = newTestDatabase()
|
||||
|
@ -7,17 +7,17 @@ import
|
||||
chronicles,
|
||||
libp2p/crypto/crypto
|
||||
import
|
||||
../../waku/v2/protocol/waku_message,
|
||||
../../waku/v2/protocol/waku_store,
|
||||
../../waku/v2/node/storage/sqlite,
|
||||
../../waku/common/sqlite,
|
||||
../../waku/v2/node/storage/message/sqlite_store,
|
||||
../../waku/v2/node/peer_manager/peer_manager,
|
||||
../../waku/v2/protocol/waku_message,
|
||||
../../waku/v2/protocol/waku_store,
|
||||
./testlib/common,
|
||||
./testlib/switch
|
||||
|
||||
|
||||
proc newTestDatabase(): SqliteDatabase =
|
||||
SqliteDatabase.init("", inMemory = true).tryGet()
|
||||
SqliteDatabase.new("memory:").tryGet()
|
||||
|
||||
proc newTestMessageStore(): MessageStore =
|
||||
let database = newTestDatabase()
|
||||
|
@ -14,7 +14,7 @@ import
|
||||
libp2p/protocols/pubsub/pubsub,
|
||||
libp2p/protocols/pubsub/gossipsub
|
||||
import
|
||||
../../waku/v2/node/storage/sqlite,
|
||||
../../waku/common/sqlite,
|
||||
../../waku/v2/node/storage/message/sqlite_store,
|
||||
../../waku/v2/node/storage/message/waku_store_queue,
|
||||
../../waku/v2/protocol/waku_message,
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# libtool - Provide generalized library-building support services.
|
||||
# Generated automatically by config.status (libbacktrace) version-unused
|
||||
# Libtool was configured on host fv-az186-413:
|
||||
# Libtool was configured on host fv-az260-712:
|
||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||
#
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
|
||||
|
@ -118,16 +118,6 @@ proc new*(T: type SqliteDatabase, path: string, readOnly=false): DatabaseResult[
|
||||
|
||||
ok(SqliteDatabase(env: env.release))
|
||||
|
||||
proc init*(
|
||||
T: type SqliteDatabase,
|
||||
basePath: string,
|
||||
name: string = "store",
|
||||
readOnly = false,
|
||||
inMemory = false): DatabaseResult[T] {.deprecated: "use `SqliteDatabase.new()` instead".} =
|
||||
let path = if inMemory: ":memory:"
|
||||
else: basePath / name & ".sqlite3"
|
||||
SqliteDatabase.new(path, readOnly)
|
||||
|
||||
|
||||
template prepare*(env: Sqlite, q: string, cleanup: untyped): ptr sqlite3_stmt =
|
||||
var s: ptr sqlite3_stmt
|
@ -5,7 +5,7 @@ import
|
||||
stew/[results, byteutils],
|
||||
sqlite3_abi
|
||||
import
|
||||
../../sqlite,
|
||||
../../../../../common/sqlite,
|
||||
../../../../protocol/waku_message,
|
||||
../../../../utils/time
|
||||
|
||||
|
@ -3,15 +3,15 @@
|
||||
{.push raises: [Defect].}
|
||||
|
||||
import
|
||||
std/[options, tables, sequtils, algorithm, times],
|
||||
std/[options, tables],
|
||||
stew/[byteutils, results],
|
||||
chronicles
|
||||
import
|
||||
../../../../../common/sqlite,
|
||||
../../../../protocol/waku_message,
|
||||
../../../../protocol/waku_store/pagination,
|
||||
../../../../protocol/waku_store/message_store,
|
||||
../../../../utils/time,
|
||||
../../sqlite,
|
||||
./queries
|
||||
|
||||
logScope:
|
||||
|
@ -3,7 +3,7 @@ import
|
||||
stew/results,
|
||||
chronicles
|
||||
import
|
||||
./sqlite,
|
||||
../../../common/sqlite,
|
||||
./migration/migration_types,
|
||||
./migration/migration_utils
|
||||
|
||||
|
@ -2,12 +2,13 @@
|
||||
|
||||
import
|
||||
std/sets,
|
||||
sqlite3_abi,
|
||||
libp2p/protobuf/minprotobuf,
|
||||
stew/results,
|
||||
./peer_storage,
|
||||
../sqlite,
|
||||
../../peer_manager/waku_peer_store
|
||||
sqlite3_abi,
|
||||
libp2p/protobuf/minprotobuf
|
||||
import
|
||||
../../../../common/sqlite,
|
||||
../../peer_manager/waku_peer_store,
|
||||
./peer_storage
|
||||
|
||||
export sqlite
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user