mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-06-07 02:59:59 +00:00
Fix: test for correct verify root in slot builder.
This commit is contained in:
parent
9c1ea719d8
commit
964fe47ea2
@ -354,6 +354,14 @@ proc new*(
|
||||
error "Failed to build slot roots tree", err = err.msg
|
||||
return failure(err)
|
||||
|
||||
without expectedRoot =? manifest.verifyRoot.fromVerifyCid(), err:
|
||||
error "Unable to convert manifest verifyRoot to hash", error = err.msg
|
||||
return failure(err)
|
||||
|
||||
if verifyRoot =? tree.root:
|
||||
if verifyRoot != expectedRoot:
|
||||
return failure "Existing slots root doesn't match reconstructed root."
|
||||
|
||||
self.slotRoots = slotRoots
|
||||
self.verifyTree = some tree
|
||||
|
||||
|
||||
@ -361,7 +361,7 @@ suite "Slot builder":
|
||||
verifyManifest,
|
||||
cellSize = cellSize).isErr
|
||||
|
||||
test "Should not build from verifiable manifest with slots root":
|
||||
test "Should not build from verifiable manifest with invalid verify root":
|
||||
let
|
||||
slotBuilder = SlotsBuilder.new(
|
||||
localStore,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user