Skip to content

Commit d6a8bce

Browse files
authored
Merge pull request #22 from DinghaoLI/patch_1
trie源码分析.md中,“数据结构”对于shortNode的描述有偏差
2 parents 0c9d4f4 + f9b6062 commit d6a8bce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trie源码分析.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ encoding.go主要处理trie树中的三种编码格式的相互转换的工作
200200
}
201201

202202
### 数据结构
203-
node的结构,可以看到node分为4种类型, fullNode对应了黄皮书里面的分支节点,shortNode对应了黄皮书里面的扩展节点和叶子节点(通过shortNode.Val的类型来对应到底是叶子节点(valueNode)还是分支节点(fullNode))
203+
node的结构,可以看到node分为4种类型, fullNode对应了黄皮书里面的分支节点,shortNode对应了黄皮书里面的扩展节点和叶子节点(通过shortNode.Val的类型来判断当前节点是叶子节点(shortNode.Val为valueNode)还是拓展节点(通过shortNode.Val指向下一个node))。
204204

205205
type node interface {
206206
fstring(string) string

0 commit comments

Comments
 (0)