From f471ec9f8ff4437b5563ffe26143e07aa9e9d40c Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Fri, 30 Jan 2026 10:05:28 +0800 Subject: [PATCH] Fix formatting and comments in history_trienode.go --- triedb/pathdb/history_trienode.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/triedb/pathdb/history_trienode.go b/triedb/pathdb/history_trienode.go index 1f63e6b438..a065d02eb8 100644 --- a/triedb/pathdb/history_trienode.go +++ b/triedb/pathdb/history_trienode.go @@ -396,12 +396,12 @@ func decodeRestartTrailer(keySection []byte) ([]uint32, []uint32, int, error) { return nil, nil, 0, fmt.Errorf("key section too short, size: %d", len(keySection)) } nRestarts := binary.BigEndian.Uint32(keySection[len(keySection)-4:]) + + // Decode the trailer var ( keyOffsets = make([]uint32, 0, int(nRestarts)) valOffsets = make([]uint32, 0, int(nRestarts)) ) - - // Decode the trailer if len(keySection) < int(8*nRestarts)+4 { return nil, nil, 0, fmt.Errorf("key section too short, restarts: %d, size: %d", nRestarts, len(keySection)) }