From 5b3826f5de82eb3dcb43bcb85261cd56e298668a Mon Sep 17 00:00:00 2001 From: axtloss Date: Sun, 4 Feb 2024 15:14:49 +0100 Subject: Repeated block verification --- core/storage.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/storage.go') 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: -- cgit v1.2.3