From ebd5fc7070b5a4fc9671a2ff0fcdc6be42245325 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Tue, 9 Apr 2024 15:55:27 +0800 Subject: [PATCH] eth/protocols/snap: improve code comment --- eth/protocols/snap/gentrie.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eth/protocols/snap/gentrie.go b/eth/protocols/snap/gentrie.go index 5d58f20897..9ba28b56bd 100644 --- a/eth/protocols/snap/gentrie.go +++ b/eth/protocols/snap/gentrie.go @@ -138,7 +138,9 @@ func (t *pathTrie) onTrieNode(path []byte, hash common.Hash, blob []byte) { // break the state healing. // // The target node is detected if its path is the prefix of last written - // one and path gap is non-zero. + // one and path gap is larger than one. The current node could be a full + // node, or a shortNode with single byte key if the path gap is one, + // unnecessary to sweep the internal path in this case. // // Nodes must be cleaned from top to bottom, including the node with the // path of the committed extension node itself.