moare project structure reorg
This commit is contained in:
parent
231276d6fe
commit
99f87b94b8
|
@ -0,0 +1,11 @@
|
||||||
|
import ./blockexchange/[
|
||||||
|
network,
|
||||||
|
engine,
|
||||||
|
peercontext]
|
||||||
|
|
||||||
|
import ./blockexchange/protobuf/[
|
||||||
|
blockexc,
|
||||||
|
payments,
|
||||||
|
presence]
|
||||||
|
|
||||||
|
export network, engine, peercontext, blockexc, payments, presence
|
Binary file not shown.
|
@ -15,18 +15,19 @@ import pkg/chronicles
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/libp2p/errors
|
import pkg/libp2p/errors
|
||||||
|
|
||||||
|
import ../stores/blockstore
|
||||||
|
import ../blocktype as bt
|
||||||
|
import ../utils/asyncheapqueue
|
||||||
|
|
||||||
import ./protobuf/blockexc
|
import ./protobuf/blockexc
|
||||||
import ./protobuf/presence
|
import ./protobuf/presence
|
||||||
import ../../blocktype as bt
|
|
||||||
import ../blockstore
|
|
||||||
import ../../utils/asyncheapqueue
|
|
||||||
|
|
||||||
import ./network
|
import ./network
|
||||||
import ./pendingblocks
|
import ./pendingblocks
|
||||||
import ./peercontext
|
import ./peercontext
|
||||||
import ./engine/payments
|
import ./engine/payments
|
||||||
|
|
||||||
export peercontext
|
export peercontext, payments, pendingblocks
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger blockexc engine"
|
topics = "dagger blockexc engine"
|
|
@ -16,13 +16,12 @@ import pkg/libp2p
|
||||||
import pkg/questionable
|
import pkg/questionable
|
||||||
import pkg/questionable/results
|
import pkg/questionable/results
|
||||||
|
|
||||||
import ../../blocktype as bt
|
import ../blocktype as bt
|
||||||
import ./protobuf/blockexc as pb
|
import ./protobuf/blockexc as pb
|
||||||
import ./protobuf/payments
|
import ./protobuf/payments
|
||||||
import ./networkpeer
|
import ./networkpeer
|
||||||
|
|
||||||
export networkpeer
|
export networkpeer, payments
|
||||||
export payments
|
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger blockexc network"
|
topics = "dagger blockexc network"
|
|
@ -8,8 +8,7 @@ import ./protobuf/blockexc
|
||||||
import ./protobuf/payments
|
import ./protobuf/payments
|
||||||
import ./protobuf/presence
|
import ./protobuf/presence
|
||||||
|
|
||||||
export payments
|
export payments, nitro
|
||||||
export nitro
|
|
||||||
|
|
||||||
type
|
type
|
||||||
BlockExcPeerCtx* = ref object of RootObj
|
BlockExcPeerCtx* = ref object of RootObj
|
|
@ -13,7 +13,7 @@ import pkg/chronicles
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
|
|
||||||
import ../../blocktype
|
import ../blocktype
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger blockexc pendingblocks"
|
topics = "dagger blockexc pendingblocks"
|
|
@ -0,0 +1,3 @@
|
||||||
|
import ./stores/[memorystore, blockstore, blockexchange]
|
||||||
|
|
||||||
|
export memorystore, blockstore, blockexchange
|
|
@ -14,15 +14,16 @@ import pkg/chronos
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/libp2p/errors
|
import pkg/libp2p/errors
|
||||||
|
|
||||||
import ./stores/network/protobuf/blockexc as pb
|
import ../blocktype as bt
|
||||||
import ./blocktype as bt
|
import ../utils/asyncheapqueue
|
||||||
import ./stores/blockstore
|
|
||||||
import ./utils/asyncheapqueue
|
|
||||||
|
|
||||||
import ./stores/network/network
|
import ./blockstore
|
||||||
import ./stores/network/engine
|
import ../blockexchange/network
|
||||||
|
import ../blockexchange/engine
|
||||||
|
import ../blockexchange/peercontext
|
||||||
|
import ../blockexchange/protobuf/blockexc as pb
|
||||||
|
|
||||||
export network, blockstore, asyncheapqueue, engine
|
export blockstore, network, engine, asyncheapqueue
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger blockexc"
|
topics = "dagger blockexc"
|
|
@ -1,5 +1,6 @@
|
||||||
import std/unittest
|
import std/unittest
|
||||||
import pkg/dagger/stores/network/engine/payments
|
|
||||||
|
import pkg/dagger/stores
|
||||||
import ../../examples
|
import ../../examples
|
||||||
|
|
||||||
suite "engine payments":
|
suite "engine payments":
|
||||||
|
|
|
@ -2,7 +2,7 @@ import pkg/asynctest
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/stew/byteutils
|
import pkg/stew/byteutils
|
||||||
import ../../examples
|
import ../../examples
|
||||||
import pkg/dagger/stores/network/protobuf/payments
|
import pkg/dagger/stores
|
||||||
|
|
||||||
suite "account protobuf messages":
|
suite "account protobuf messages":
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@ import std/sequtils
|
||||||
import pkg/asynctest
|
import pkg/asynctest
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/dagger/stores/network/protobuf/presence
|
|
||||||
|
import pkg/dagger/blockexchange/protobuf/presence
|
||||||
import ../../examples
|
import ../../examples
|
||||||
|
|
||||||
suite "block presence protobuf messages":
|
suite "block presence protobuf messages":
|
||||||
|
|
|
@ -8,14 +8,11 @@ import pkg/libp2p
|
||||||
import pkg/libp2p/errors
|
import pkg/libp2p/errors
|
||||||
|
|
||||||
import pkg/dagger/rng
|
import pkg/dagger/rng
|
||||||
import pkg/dagger/blockexc
|
import pkg/dagger/blockexchange
|
||||||
import pkg/dagger/stores/network/protobuf/blockexc as pb
|
import pkg/dagger/stores
|
||||||
import pkg/dagger/stores/network/pendingblocks
|
|
||||||
import pkg/dagger/stores/network/engine/payments
|
|
||||||
import pkg/dagger/stores/network/protobuf/presence
|
|
||||||
import pkg/dagger/stores/memorystore
|
|
||||||
import pkg/dagger/chunker
|
import pkg/dagger/chunker
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/dagger/blocktype as bt
|
||||||
|
import pkg/dagger/utils/asyncheapqueue
|
||||||
|
|
||||||
import ../helpers
|
import ../helpers
|
||||||
import ../examples
|
import ../examples
|
||||||
|
|
|
@ -5,15 +5,14 @@ import pkg/asynctest
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/libp2p/errors
|
import pkg/libp2p/errors
|
||||||
|
import questionable
|
||||||
|
import questionable/results
|
||||||
import pkg/protobuf_serialization
|
import pkg/protobuf_serialization
|
||||||
|
|
||||||
import pkg/dagger/rng
|
import pkg/dagger/rng
|
||||||
import pkg/dagger/chunker
|
import pkg/dagger/chunker
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/dagger/blocktype as bt
|
||||||
import pkg/dagger/stores/memorystore
|
import pkg/dagger/blockexchange
|
||||||
import pkg/dagger/stores/network/network
|
|
||||||
import pkg/dagger/stores/network/protobuf/blockexc
|
|
||||||
import pkg/dagger/stores/network/protobuf/payments
|
|
||||||
|
|
||||||
import ../helpers
|
import ../helpers
|
||||||
import ../examples
|
import ../examples
|
||||||
|
|
|
@ -3,9 +3,7 @@ import std/sequtils
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/nitro
|
import pkg/nitro
|
||||||
import pkg/dagger/rng
|
import pkg/dagger/rng
|
||||||
import pkg/dagger/stores/network/protobuf/payments
|
import pkg/dagger/stores
|
||||||
import pkg/dagger/stores/network/peercontext
|
|
||||||
import pkg/dagger/stores/network/engine
|
|
||||||
import pkg/dagger/blocktype
|
import pkg/dagger/blocktype
|
||||||
|
|
||||||
proc example*(_: type EthAddress): EthAddress =
|
proc example*(_: type EthAddress): EthAddress =
|
||||||
|
|
|
@ -4,17 +4,15 @@ import std/algorithm
|
||||||
import pkg/asynctest
|
import pkg/asynctest
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/stew/byteutils
|
import pkg/stew/byteutils
|
||||||
|
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/libp2p/errors
|
import pkg/libp2p/errors
|
||||||
|
|
||||||
import pkg/dagger/rng
|
import pkg/dagger/rng
|
||||||
import pkg/dagger/blockexc
|
import pkg/dagger/stores
|
||||||
import pkg/dagger/stores/network/protobuf/blockexc as pb
|
import pkg/dagger/blockexchange
|
||||||
import pkg/dagger/stores/network/engine/payments
|
|
||||||
import pkg/dagger/stores/memorystore
|
|
||||||
import pkg/dagger/chunker
|
import pkg/dagger/chunker
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/dagger/blocktype as bt
|
||||||
import pkg/dagger/utils/asyncheapqueue
|
|
||||||
|
|
||||||
import ./utils
|
import ./utils
|
||||||
import ../helpers
|
import ../helpers
|
|
@ -10,7 +10,7 @@ import pkg/dagger/rng
|
||||||
import pkg/dagger/stores/memorystore
|
import pkg/dagger/stores/memorystore
|
||||||
import pkg/dagger/chunker
|
import pkg/dagger/chunker
|
||||||
|
|
||||||
import ./helpers
|
import ../helpers
|
||||||
|
|
||||||
suite "Memory Store":
|
suite "Memory Store":
|
||||||
|
|
|
@ -3,8 +3,7 @@ import std/sequtils
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
|
|
||||||
import pkg/dagger/blockexc
|
import pkg/dagger/stores
|
||||||
import pkg/dagger/stores/memorystore
|
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/dagger/blocktype as bt
|
||||||
|
|
||||||
import ../examples
|
import ../examples
|
||||||
|
@ -15,7 +14,6 @@ proc generateNodes*(
|
||||||
secureManagers: openarray[SecureProtocol] = [
|
secureManagers: openarray[SecureProtocol] = [
|
||||||
SecureProtocol.Noise,
|
SecureProtocol.Noise,
|
||||||
]): seq[tuple[switch: Switch, blockexc: BlockExc]] =
|
]): seq[tuple[switch: Switch, blockexc: BlockExc]] =
|
||||||
|
|
||||||
for i in 0..<num:
|
for i in 0..<num:
|
||||||
let
|
let
|
||||||
switch = newStandardSwitch(transportFlags = {ServerFlags.ReuseAddr})
|
switch = newStandardSwitch(transportFlags = {ServerFlags.ReuseAddr})
|
|
@ -0,0 +1,5 @@
|
||||||
|
import ./blockexc/testengine
|
||||||
|
import ./blockexc/testnetwork
|
||||||
|
import ./blockexc/protobuf/testpayments as testprotobufpayments
|
||||||
|
import ./blockexc/protobuf/testpresence
|
||||||
|
import ./blockexc/engine/testpayments as testenginepayments
|
|
@ -0,0 +1,2 @@
|
||||||
|
import ./stores/testblockexc
|
||||||
|
import ./stores/testblockstore
|
|
@ -1,11 +1,6 @@
|
||||||
import ./dagger/blockexc/testblockexc
|
import ./dagger/teststores
|
||||||
import ./dagger/blockexc/testengine
|
import ./dagger/testblockexc
|
||||||
import ./dagger/blockexc/testnetwork
|
|
||||||
import ./dagger/blockexc/protobuf/testpayments as testprotobufpayments
|
|
||||||
import ./dagger/blockexc/protobuf/testpresence
|
|
||||||
import ./dagger/blockexc/engine/testpayments as testenginepayments
|
|
||||||
import ./dagger/testasyncheapqueue
|
import ./dagger/testasyncheapqueue
|
||||||
import ./dagger/testblockstore
|
|
||||||
import ./dagger/testchunking
|
import ./dagger/testchunking
|
||||||
import ./dagger/testblockset
|
import ./dagger/testblockset
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue