chore(store): collocate pagination and message store types

This commit is contained in:
Lorenzo Delgado 2022-09-28 13:36:05 +02:00 committed by GitHub
parent 5ee4a00765
commit 612023fab0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 36 additions and 45 deletions

View File

@ -14,7 +14,6 @@ import
libp2p/protocols/pubsub/rpc/message
import
../../waku/v1/node/rpc/hexstrings,
../../waku/v2/node/storage/message/message_store,
../../waku/v2/node/storage/message/waku_store_queue,
../../waku/v2/node/wakunode2,
../../waku/v2/node/jsonrpc/[store_api,

View File

@ -6,12 +6,10 @@ import
testutils/unittests,
nimcrypto/hash
import
../../waku/v2/node/storage/message/message_store,
../../waku/v2/node/storage/message/waku_store_queue,
../../waku/v2/protocol/waku_message,
../../waku/v2/protocol/waku_store,
../../waku/v2/utils/time,
../../waku/v2/utils/pagination
../../waku/v2/utils/time
# Helper functions

View File

@ -9,8 +9,7 @@ import
../../waku/v2/node/storage/message/waku_store_queue,
../../waku/v2/protocol/waku_store,
../../waku/v2/protocol/waku_message,
../../waku/v2/utils/time,
../../waku/v2/utils/pagination
../../waku/v2/utils/time
const

View File

@ -12,8 +12,8 @@ import
../../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,
../../waku/v2/utils/pagination,
./utils

View File

@ -9,8 +9,8 @@ import
../../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,
../../waku/v2/utils/pagination,
./utils

View File

@ -12,11 +12,9 @@ import
../../waku/v2/protocol/waku_message,
../../waku/v2/protocol/waku_store,
../../waku/v2/node/storage/sqlite,
../../waku/v2/node/storage/message/message_store,
../../waku/v2/node/storage/message/waku_store_queue,
../../waku/v2/node/storage/message/sqlite_store,
../../waku/v2/node/peer_manager/peer_manager,
../../waku/v2/utils/pagination,
../../waku/v2/utils/time,
../test_helpers

View File

@ -9,7 +9,6 @@ import
import
../../waku/v2/protocol/waku_message,
../../waku/v2/protocol/waku_store,
../../waku/v2/utils/pagination,
../../waku/v2/utils/time
const

View File

@ -15,7 +15,6 @@ import
libp2p/protocols/pubsub/gossipsub
import
../../waku/v2/node/storage/sqlite,
../../waku/v2/node/storage/message/message_store,
../../waku/v2/node/storage/message/sqlite_store,
../../waku/v2/node/storage/message/waku_store_queue,
../../waku/v2/protocol/waku_message,
@ -23,7 +22,6 @@ import
../../waku/v2/protocol/waku_filter,
../../waku/v2/node/peer_manager/peer_manager,
../../waku/v2/utils/peers,
../../waku/v2/utils/pagination,
../../waku/v2/utils/time,
../../waku/v2/node/wakunode2

View File

@ -4,7 +4,7 @@ import
std/[options,tables],
eth/keys,
../../protocol/waku_message,
../../utils/pagination,
../../protocol/waku_store/pagination,
../../utils/time
type

View File

@ -4,10 +4,9 @@ import
std/[options, json],
eth/keys,
../../../v1/node/rpc/hexstrings,
../../protocol/waku_store,
../../protocol/waku_message,
../../protocol/waku_store,
../../utils/time,
../../utils/pagination,
../waku_payload,
./jsonrpc_types

View File

@ -8,7 +8,6 @@ import
../wakunode2,
../../protocol/waku_store,
../../utils/time,
../../utils/pagination,
./jsonrpc_types,
./jsonrpc_utils

View File

@ -6,10 +6,10 @@ import
chronicles
import
../../../protocol/waku_message,
../../../utils/pagination,
../../../protocol/waku_store/pagination,
../../../protocol/waku_store/message_store,
../../../utils/time,
../sqlite,
./message_store,
./waku_store_queue,
./sqlite_store

View File

@ -3,7 +3,7 @@
import
stew/results
import
./message_store
../../../protocol/waku_store/message_store
type RetentionPolicyResult*[T] = Result[T, string]

View File

@ -4,7 +4,7 @@ import
stew/results,
chronicles
import
./message_store,
../../../protocol/waku_store/message_store,
./message_retention_policy
logScope:

View File

@ -6,8 +6,8 @@ import
chronicles,
chronos
import
../../../protocol/waku_store/message_store,
../../../utils/time,
./message_store,
./message_retention_policy
logScope:

View File

@ -5,8 +5,8 @@ import
nimcrypto/sha2
import
../../../../protocol/waku_message,
../../../../utils/time,
../../../../utils/pagination
../../../../protocol/waku_store/pagination,
../../../../utils/time
type Index* = object

View File

@ -7,9 +7,9 @@ import
import
../../../../protocol/waku_message,
../../../../protocol/waku_store/rpc,
../../../../utils/pagination,
../../../../protocol/waku_store/pagination,
../../../../protocol/waku_store/message_store,
../../../../utils/time,
../message_store,
./index

View File

@ -7,7 +7,7 @@ import
import
../../sqlite,
../../../../protocol/waku_message,
../../../../utils/pagination,
../../../../protocol/waku_store/pagination,
../../../../utils/time

View File

@ -8,10 +8,10 @@ import
chronicles
import
../../../../protocol/waku_message,
../../../../utils/pagination,
../../../../protocol/waku_store/pagination,
../../../../protocol/waku_store/message_store,
../../../../utils/time,
../../sqlite,
../message_store,
./queries
logScope:

View File

@ -25,7 +25,6 @@ import
../utils/[peers, requests, wakuenr],
./peer_manager/peer_manager,
./storage/message/waku_store_queue,
./storage/message/message_store,
./storage/message/message_retention_policy,
./storage/message/message_retention_policy_capacity,
./storage/message/message_retention_policy_time,
@ -819,7 +818,6 @@ when isMainModule:
./wakunode2_setup_rpc,
./wakunode2_setup_sql_migrations,
./storage/sqlite,
./storage/message/message_store,
./storage/message/dual_message_store,
./storage/message/sqlite_store,
./storage/peer/waku_peer_storage

View File

@ -1,9 +1,13 @@
import
./waku_store/protocol,
./waku_store/rpc,
./waku_store/rpc_codec
./waku_store/rpc_codec,
./waku_store/pagination,
./waku_store/message_store
export
protocol,
rpc,
rpc_codec
rpc_codec,
pagination,
message_store

View File

@ -7,9 +7,9 @@ import
std/[options, times],
stew/results
import
../../../protocol/waku_message,
../../../utils/time,
../../../utils/pagination
../waku_message,
./pagination,
../../utils/time
type

View File

@ -5,8 +5,8 @@ import
stew/byteutils,
nimcrypto/sha2
import
../protocol/waku_message,
./time
../waku_message,
../../utils/time
const
MaxPageSize*: uint64 = 100

View File

@ -15,17 +15,17 @@ import
libp2p/stream/connection,
metrics
import
../../node/storage/message/message_store,
../../node/storage/message/message_retention_policy,
../../node/storage/message/waku_store_queue,
../../node/peer_manager/peer_manager,
../../utils/time,
../../utils/pagination,
../../utils/requests,
../waku_message,
../waku_swap/waku_swap,
./rpc,
./rpc_codec
./rpc_codec,
./pagination,
./message_store
declarePublicGauge waku_store_messages, "number of historical messages", ["type"]

View File

@ -4,8 +4,8 @@ import
nimcrypto/hash
import
../waku_message,
../../utils/pagination,
../../utils/time
../../utils/time,
./pagination
type

View File

@ -7,9 +7,9 @@ import
import
../waku_message,
../../utils/protobuf,
../../utils/pagination,
../../utils/time,
./rpc
./rpc,
./pagination
const MaxRpcSize* = MaxPageSize * MaxWakuMessageSize + 64*1024 # We add a 64kB safety buffer for protocol overhead