From 5bab1906069e52a898b983426ab74bd2e61dddd2 Mon Sep 17 00:00:00 2001 From: clippytool Date: Wed, 21 Oct 2026 22:49:13 +0800 Subject: [PATCH] docs(types): correct misleading comments in Data Signed-off-by: clippytool --- types/data.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/data.go b/types/data.go index 30a6fe8b57..a60bdb06c8 100644 --- a/types/data.go +++ b/types/data.go @@ -100,7 +100,7 @@ func (d *Data) Height() uint64 { return d.Metadata.Height } -// LastHeader returns last header hash of the block. +// LastHeader returns the previous block's data hash. func (d *Data) LastHeader() Hash { return d.LastDataHash } @@ -116,7 +116,7 @@ func (d *Data) Verify(untrustedData *Data) error { return errors.New("untrusted block cannot be nil") } dataHash := d.Hash() - // Check if the data hash of the untrusted block matches the last data hash of the trusted block + // Check if the trusted block's data hash matches the untrusted block's last data hash. if !bytes.Equal(dataHash[:], untrustedData.LastDataHash[:]) { return errors.New("data hash of the trusted data does not match with last data hash of the untrusted data") }