diff options
author | axtloss <axtlos@getcryst.al> | 2024-02-04 15:14:49 +0100 |
---|---|---|
committer | axtloss <axtlos@getcryst.al> | 2024-02-04 15:14:49 +0100 |
commit | 5b3826f5de82eb3dcb43bcb85261cd56e298668a (patch) | |
tree | b5a10c89fbc2b3a1123aa19b770305e5e3de8854 /core/storage.go | |
parent | 71cc54810fdb51e428b83a37ff89d54a6cc3d8c8 (diff) | |
download | fsverify-5b3826f5de82eb3dcb43bcb85261cd56e298668a.tar.gz fsverify-5b3826f5de82eb3dcb43bcb85261cd56e298668a.tar.bz2 |
Repeated block verification
Diffstat (limited to 'core/storage.go')
-rw-r--r-- | core/storage.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/storage.go b/core/storage.go index 8346c12..6e9245a 100644 --- a/core/storage.go +++ b/core/storage.go @@ -27,6 +27,10 @@ type Node struct { PrevNodeSum string } +func (n *Node) GetHash() (string, error) { + return calculateStringHash(fmt.Sprintf("%d%d%s%s", n.BlockStart, n.BlockEnd, n.BlockSum, n.PrevNodeSum)) +} + func parseUnitSpec(size []byte) int { switch size[0] { case 0: |