Bump questionable and test for tree init failure (#630)

This commit is contained in:
Tomasz Bekas 2023-11-21 19:30:14 +01:00 committed by GitHub
parent ec8d0c98b2
commit 4d546f9ace
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 18 deletions

View File

@ -50,6 +50,12 @@ checksuite "merkletree":
zeroHash = MultiHash.init($sha256, zero).tryGet() zeroHash = MultiHash.init($sha256, zero).tryGet()
oneHash = MultiHash.init($sha256, one).tryGet() oneHash = MultiHash.init($sha256, one).tryGet()
test "cannot init tree without any leafs":
let treeOrErr = MerkleTree.init(newSeq[MultiHash]())
check:
treeOrErr.isErr
test "tree with one leaf has expected structure": test "tree with one leaf has expected structure":
builder.addDataBlock(data[0]).tryGet() builder.addDataBlock(data[0]).tryGet()

2
vendor/questionable vendored

@ -1 +1 @@
Subproject commit 2dd6b6b220f9f14a1231f6cafdf24f012bcc8414 Subproject commit 1f0afff48bf80ab1149a0957f9743f345bc14b71