aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2024-01-10 15:49:53 +0000
committerGitHub <noreply@github.com>2024-01-10 15:49:53 +0000
commita6e934f1f76996c7f92cb4fde708170c1eb5d032 (patch)
tree47311196014239d8be97c916db62b5811105b9c1
parentf7c30f52dca01f68790fdd74f519817c35fdf257 (diff)
parent0eddb86dd6ef2726c29613908f9979020632eedc (diff)
downloadgo-git-a6e934f1f76996c7f92cb4fde708170c1eb5d032.tar.gz
Merge pull request #992 from codablock/update-comment
utils: update comment in node.go's Hash()
-rw-r--r--utils/merkletrie/filesystem/node.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/merkletrie/filesystem/node.go b/utils/merkletrie/filesystem/node.go
index 6c91f44..3380062 100644
--- a/utils/merkletrie/filesystem/node.go
+++ b/utils/merkletrie/filesystem/node.go
@@ -50,6 +50,10 @@ func NewRootNode(
// difftree algorithm will detect changes in the contents of files and also in
// their mode.
//
+// Please note that the hash is calculated on first invocation of Hash(),
+// meaning that it will not update when the underlying file changes
+// between invocations.
+//
// The hash of a directory is always a 24-bytes slice of zero values
func (n *node) Hash() []byte {
if n.hash == nil {