Skip to content

Commit

Permalink
Use GetDescendants instead of accessing Descendants directly
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Mar 9, 2022
1 parent 24bb458 commit 436cb26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/trie/node/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func (b *Branch) Copy(copyChildren bool) Node {
cpy := &Branch{
Dirty: b.Dirty,
Generation: b.Generation,
Descendants: b.Descendants,
Descendants: b.GetDescendants(),
}

if copyChildren {
Expand Down
2 changes: 1 addition & 1 deletion lib/trie/trie_endtoend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ func countNodesFromStats(root Node) (nodesCount uint32) {
} else if root.Type() == node.LeafType {
return 1
}
return 1 + root.(*node.Branch).Descendants
return 1 + root.(*node.Branch).GetDescendants()
}

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

0 comments on commit 436cb26

Please sign in to comment.