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/errors
|
||||
|
||||
import ../stores/blockstore
|
||||
import ../blocktype as bt
|
||||
import ../utils/asyncheapqueue
|
||||
|
||||
import ./protobuf/blockexc
|
||||
import ./protobuf/presence
|
||||
import ../../blocktype as bt
|
||||
import ../blockstore
|
||||
import ../../utils/asyncheapqueue
|
||||
|
||||
import ./network
|
||||
import ./pendingblocks
|
||||
import ./peercontext
|
||||
import ./engine/payments
|
||||
|
||||
export peercontext
|
||||
export peercontext, payments, pendingblocks
|
||||
|
||||
logScope:
|
||||
topics = "dagger blockexc engine"
|
|
@ -16,13 +16,12 @@ import pkg/libp2p
|
|||
import pkg/questionable
|
||||
import pkg/questionable/results
|
||||
|
||||
import ../../blocktype as bt
|
||||
import ../blocktype as bt
|
||||
import ./protobuf/blockexc as pb
|
||||
import ./protobuf/payments
|
||||
import ./networkpeer
|
||||
|
||||
export networkpeer
|
||||
export payments
|
||||
export networkpeer, payments
|
||||
|
||||
logScope:
|
||||
topics = "dagger blockexc network"
|
|
@ -8,8 +8,7 @@ import ./protobuf/blockexc
|
|||
import ./protobuf/payments
|
||||
import ./protobuf/presence
|
||||
|
||||
export payments
|
||||
export nitro
|
||||
export payments, nitro
|
||||
|
||||
type
|
||||
BlockExcPeerCtx* = ref object of RootObj
|
|
@ -13,7 +13,7 @@ import pkg/chronicles
|
|||
import pkg/chronos
|
||||
import pkg/libp2p
|
||||
|
||||
import ../../blocktype
|
||||
import ../blocktype
|
||||
|
||||
logScope:
|
||||
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/errors
|
||||
|
||||
import ./stores/network/protobuf/blockexc as pb
|
||||
import ./blocktype as bt
|
||||
import ./stores/blockstore
|
||||
import ./utils/asyncheapqueue
|
||||
import ../blocktype as bt
|
||||
import ../utils/asyncheapqueue
|
||||
|
||||
import ./stores/network/network
|
||||
import ./stores/network/engine
|
||||
import ./blockstore
|
||||
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:
|
||||
topics = "dagger blockexc"
|
|
@ -1,5 +1,6 @@
|
|||
import std/unittest
|
||||
import pkg/dagger/stores/network/engine/payments
|
||||
|
||||
import pkg/dagger/stores
|
||||
import ../../examples
|
||||
|
||||
suite "engine payments":
|
||||
|
|
|
@ -2,7 +2,7 @@ import pkg/asynctest
|
|||
import pkg/chronos
|
||||
import pkg/stew/byteutils
|
||||
import ../../examples
|
||||
import pkg/dagger/stores/network/protobuf/payments
|
||||
import pkg/dagger/stores
|
||||
|
||||
suite "account protobuf messages":
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@ import std/sequtils
|
|||
import pkg/asynctest
|
||||
import pkg/chronos
|
||||
import pkg/libp2p
|
||||
import pkg/dagger/stores/network/protobuf/presence
|
||||
|
||||
import pkg/dagger/blockexchange/protobuf/presence
|
||||
import ../../examples
|
||||
|
||||
suite "block presence protobuf messages":
|
||||
|
|
|
@ -8,14 +8,11 @@ import pkg/libp2p
|
|||
import pkg/libp2p/errors
|
||||
|
||||
import pkg/dagger/rng
|
||||
import pkg/dagger/blockexc
|
||||
import pkg/dagger/stores/network/protobuf/blockexc as pb
|
||||
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/blockexchange
|
||||
import pkg/dagger/stores
|
||||
import pkg/dagger/chunker
|
||||
import pkg/dagger/blocktype as bt
|
||||
import pkg/dagger/utils/asyncheapqueue
|
||||
|
||||
import ../helpers
|
||||
import ../examples
|
||||
|
|
|
@ -5,15 +5,14 @@ import pkg/asynctest
|
|||
import pkg/chronos
|
||||
import pkg/libp2p
|
||||
import pkg/libp2p/errors
|
||||
import questionable
|
||||
import questionable/results
|
||||
import pkg/protobuf_serialization
|
||||
|
||||
import pkg/dagger/rng
|
||||
import pkg/dagger/chunker
|
||||
import pkg/dagger/blocktype as bt
|
||||
import pkg/dagger/stores/memorystore
|
||||
import pkg/dagger/stores/network/network
|
||||
import pkg/dagger/stores/network/protobuf/blockexc
|
||||
import pkg/dagger/stores/network/protobuf/payments
|
||||
import pkg/dagger/blockexchange
|
||||
|
||||
import ../helpers
|
||||
import ../examples
|
||||
|
|
|
@ -3,9 +3,7 @@ import std/sequtils
|
|||
import pkg/libp2p
|
||||
import pkg/nitro
|
||||
import pkg/dagger/rng
|
||||
import pkg/dagger/stores/network/protobuf/payments
|
||||
import pkg/dagger/stores/network/peercontext
|
||||
import pkg/dagger/stores/network/engine
|
||||
import pkg/dagger/stores
|
||||
import pkg/dagger/blocktype
|
||||
|
||||
proc example*(_: type EthAddress): EthAddress =
|
||||
|
|
|
@ -4,17 +4,15 @@ import std/algorithm
|
|||
import pkg/asynctest
|
||||
import pkg/chronos
|
||||
import pkg/stew/byteutils
|
||||
|
||||
import pkg/libp2p
|
||||
import pkg/libp2p/errors
|
||||
|
||||
import pkg/dagger/rng
|
||||
import pkg/dagger/blockexc
|
||||
import pkg/dagger/stores/network/protobuf/blockexc as pb
|
||||
import pkg/dagger/stores/network/engine/payments
|
||||
import pkg/dagger/stores/memorystore
|
||||
import pkg/dagger/stores
|
||||
import pkg/dagger/blockexchange
|
||||
import pkg/dagger/chunker
|
||||
import pkg/dagger/blocktype as bt
|
||||
import pkg/dagger/utils/asyncheapqueue
|
||||
|
||||
import ./utils
|
||||
import ../helpers
|
|
@ -10,7 +10,7 @@ import pkg/dagger/rng
|
|||
import pkg/dagger/stores/memorystore
|
||||
import pkg/dagger/chunker
|
||||
|
||||
import ./helpers
|
||||
import ../helpers
|
||||
|
||||
suite "Memory Store":
|
||||
|
|
@ -3,8 +3,7 @@ import std/sequtils
|
|||
import pkg/chronos
|
||||
import pkg/libp2p
|
||||
|
||||
import pkg/dagger/blockexc
|
||||
import pkg/dagger/stores/memorystore
|
||||
import pkg/dagger/stores
|
||||
import pkg/dagger/blocktype as bt
|
||||
|
||||
import ../examples
|
||||
|
@ -15,7 +14,6 @@ proc generateNodes*(
|
|||
secureManagers: openarray[SecureProtocol] = [
|
||||
SecureProtocol.Noise,
|
||||
]): seq[tuple[switch: Switch, blockexc: BlockExc]] =
|
||||
|
||||
for i in 0..<num:
|
||||
let
|
||||
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/blockexc/testengine
|
||||
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/teststores
|
||||
import ./dagger/testblockexc
|
||||
import ./dagger/testasyncheapqueue
|
||||
import ./dagger/testblockstore
|
||||
import ./dagger/testchunking
|
||||
import ./dagger/testblockset
|
||||
|
||||
|
|
Loading…
Reference in New Issue