diff --git a/dagger.nimble b/dagger.nimble index d12ceb5a..ccc4c691 100644 --- a/dagger.nimble +++ b/dagger.nimble @@ -33,5 +33,5 @@ proc test(name: string, params = "-d:chronicles_log_level=DEBUG", lang = "c") = buildBinary name, "tests/", params exec "build/" & name -task testAll, "Build & run Waku v1 tests": +task testAll, "Build & run Dagger tests": test "testAll", "-d:chronicles_log_level=WARN" diff --git a/dagger/blockexchange/engine.nim b/dagger/blockexchange/engine.nim index e16a8523..acd866fd 100644 --- a/dagger/blockexchange/engine.nim +++ b/dagger/blockexchange/engine.nim @@ -12,7 +12,6 @@ import std/sequtils import pkg/chronos import pkg/chronicles import pkg/libp2p -import pkg/libp2p/errors import ../stores/blockstore import ../blocktype as bt diff --git a/dagger/chunker.nim b/dagger/chunker.nim index 65c8fbb4..6431161e 100644 --- a/dagger/chunker.nim +++ b/dagger/chunker.nim @@ -34,7 +34,7 @@ type FixedChunker RabinChunker - Chunker* = ref object + Chunker* = object reader*: Reader case kind*: ChunkerType: of FixedChunker: diff --git a/dagger/node.nim b/dagger/node.nim index de397e11..f41051a4 100644 --- a/dagger/node.nim +++ b/dagger/node.nim @@ -72,8 +72,8 @@ proc streamBlocks*( # since disk IO is blocking for c in blockManifest: without blk =? (await node.blockStore.getBlock(c)): - trace "Couldn't retrieve block", cid = c - continue + warn "Couldn't retrieve block", cid = c + break # abort if we couldn't get a block trace "Streaming block data", cid = blk.cid, bytes = blk.data.len await stream.pushData(blk.data) diff --git a/dagger/stores/blockstore.nim b/dagger/stores/blockstore.nim index c47bbb97..771eeaa6 100644 --- a/dagger/stores/blockstore.nim +++ b/dagger/stores/blockstore.nim @@ -20,8 +20,6 @@ export blocktype, libp2p type BlockStore* = ref object of RootObj -{.push locks:"unknown".} - method getBlock*( b: BlockStore, cid: Cid): Future[?!Block] {.base.} = @@ -46,8 +44,6 @@ method delBlock*( doAssert(false, "Not implemented!") -{.pop.} - method hasBlock*(s: BlockStore, cid: Cid): bool {.base.} = ## Check if the block exists in the blockstore ## diff --git a/dagger/stores/fsstore.nim b/dagger/stores/fsstore.nim index b7b0f770..c86e6902 100644 --- a/dagger/stores/fsstore.nim +++ b/dagger/stores/fsstore.nim @@ -96,8 +96,6 @@ method delBlock*( return true -{.pop.} - method hasBlock*(self: FSStore, cid: Cid): bool = ## Check if the block exists in the blockstore ## diff --git a/dagger/stores/networkstore.nim b/dagger/stores/networkstore.nim index bec41f4e..20efed09 100644 --- a/dagger/stores/networkstore.nim +++ b/dagger/stores/networkstore.nim @@ -12,7 +12,6 @@ import pkg/chronicles import pkg/chronos import pkg/libp2p -import pkg/libp2p/errors import ../blocktype as bt import ../utils/asyncheapqueue diff --git a/tests/dagger/blockexc/testengine.nim b/tests/dagger/blockexc/testengine.nim index 43d7bffd..2be68c4b 100644 --- a/tests/dagger/blockexc/testengine.nim +++ b/tests/dagger/blockexc/testengine.nim @@ -5,7 +5,6 @@ import pkg/stew/byteutils import pkg/asynctest import pkg/chronos import pkg/libp2p -import pkg/libp2p/errors import pkg/dagger/rng import pkg/dagger/blockexchange diff --git a/tests/dagger/blockexc/testnetwork.nim b/tests/dagger/blockexc/testnetwork.nim index a4f94e8b..0b4d79dd 100644 --- a/tests/dagger/blockexc/testnetwork.nim +++ b/tests/dagger/blockexc/testnetwork.nim @@ -5,8 +5,6 @@ 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 diff --git a/tests/dagger/helpers.nim b/tests/dagger/helpers.nim index 1dc180ca..c629ef15 100644 --- a/tests/dagger/helpers.nim +++ b/tests/dagger/helpers.nim @@ -1,10 +1,5 @@ import pkg/libp2p/varint -import pkg/dagger/blocktype - -import pkg/questionable -import pkg/questionable/results - import ./helpers/nodeutils import ./helpers/randomchunker diff --git a/tests/dagger/stores/testmemorystore.nim b/tests/dagger/stores/testmemorystore.nim index 74953835..f5879a93 100644 --- a/tests/dagger/stores/testmemorystore.nim +++ b/tests/dagger/stores/testmemorystore.nim @@ -2,7 +2,6 @@ import pkg/chronos import pkg/asynctest import pkg/libp2p import pkg/stew/byteutils -import pkg/questionable import pkg/questionable/results import pkg/dagger/stores/memorystore import pkg/dagger/chunker diff --git a/tests/dagger/testnode.nim b/tests/dagger/testnode.nim index 59e00d85..4ab6f60a 100644 --- a/tests/dagger/testnode.nim +++ b/tests/dagger/testnode.nim @@ -7,7 +7,6 @@ import pkg/stew/byteutils import pkg/nitro import pkg/libp2p -import pkg/libp2p/errors import pkg/dagger/stores import pkg/dagger/blockexchange diff --git a/vendor/nim-chronicles b/vendor/nim-chronicles index 32e72c2f..16820963 160000 --- a/vendor/nim-chronicles +++ b/vendor/nim-chronicles @@ -1 +1 @@ -Subproject commit 32e72c2fc97633d84e539ca1cced213dd0841b5a +Subproject commit 1682096306ddba8185dcfac360a8c3f952d721e4 diff --git a/vendor/nim-chronos b/vendor/nim-chronos index 7dc58d42..17fed89c 160000 --- a/vendor/nim-chronos +++ b/vendor/nim-chronos @@ -1 +1 @@ -Subproject commit 7dc58d42b6905a7fd7531875fa76060f8f744e4e +Subproject commit 17fed89c99beac5a92d3668d0d3e9b0e4ac13936 diff --git a/vendor/nim-confutils b/vendor/nim-confutils index ab4ba1cb..0435e678 160000 --- a/vendor/nim-confutils +++ b/vendor/nim-confutils @@ -1 +1 @@ -Subproject commit ab4ba1cbfdccdb8c0398894ffc25169bc61faeed +Subproject commit 0435e67832b6bb8dfdf0ddb102903e9d820206d2 diff --git a/vendor/nim-libp2p b/vendor/nim-libp2p index 58f383e6..e72d03bc 160000 --- a/vendor/nim-libp2p +++ b/vendor/nim-libp2p @@ -1 +1 @@ -Subproject commit 58f383e661521314df314e7096c24db5a7490372 +Subproject commit e72d03bc78d3bc896ae5912ab45e2ecd53849aa5 diff --git a/vendor/nim-presto b/vendor/nim-presto index c41bc8ae..962bb588 160000 --- a/vendor/nim-presto +++ b/vendor/nim-presto @@ -1 +1 @@ -Subproject commit c41bc8aefc7e5342eb927f874140b80d0e989a95 +Subproject commit 962bb588d19c7180e39f0d9f18131e75861bab20 diff --git a/vendor/questionable b/vendor/questionable index 54516fd2..6018fd43 160000 --- a/vendor/questionable +++ b/vendor/questionable @@ -1 +1 @@ -Subproject commit 54516fd2d1afb9ac556099c061ec60aa201cae74 +Subproject commit 6018fd43e033d5a5310faa45bcaa1b44049469a4