Skip to content

Commit e0eee15

Browse files
committed
Use GetDescendants instead of accessing Descendants directly
1 parent bce2eea commit e0eee15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/trie/node/copy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ func (b *Branch) Copy(copyChildren bool) Node {
1010
cpy := &Branch{
1111
Dirty: b.Dirty,
1212
Generation: b.Generation,
13-
Descendants: b.Descendants,
13+
Descendants: b.GetDescendants(),
1414
}
1515

1616
if copyChildren {

lib/trie/trie_endtoend_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ func countNodesFromStats(root Node) (nodesCount uint32) {
11321132
} else if root.Type() == node.LeafType {
11331133
return 1
11341134
}
1135-
return 1 + root.(*node.Branch).Descendants
1135+
return 1 + root.(*node.Branch).GetDescendants()
11361136
}
11371137

11381138
func testDescendants(t *testing.T, root Node) {

0 commit comments

Comments
 (0)