diff --git a/dagger/blocktype.nim b/dagger/blocktype.nim index 8f201fdd..c4e65afd 100644 --- a/dagger/blocktype.nim +++ b/dagger/blocktype.nim @@ -34,17 +34,6 @@ func new*( cid: Cid.init(version, codec, hash).get(), data: @data) -func new*( - T: type Block, - data: openArray[byte] = [], - version = CIDv1, - hcodec = multiCodec("sha2-256"), - codec = multiCodec("raw")): ?!T = - let hash = MultiHash.digest($hcodec, data).get() - success Block( - cid: Cid.init(version, codec, hash).get(), - data: @data) - func new*( T: type Block, cid: Cid, diff --git a/tests/dagger/dataset.nim b/tests/dagger/dataset.nim deleted file mode 100644 index ab01ef03..00000000 --- a/tests/dagger/dataset.nim +++ /dev/null @@ -1,20 +0,0 @@ -import std/sequtils - -import pkg/chronos -import pkg/asynctest -import pkg/stew/results -import pkg/dagger/chunker -import pkg/dagger/merkletree -import pkg/stew/byteutils -import pkg/dagger/p2p/rng -import pkg/dagger/blocktype as bt - -suite "Data set": - - test "Make from Blocks": - let - chunker = newRandomChunker(Rng.instance(), size = 256*3, chunkSize = 256) - blocks = chunker.mapIt( bt.Block.new(it) ) - - let merkle = MerkleTreeRef.fromBlocks(blocks) -