aboutsummaryrefslogtreecommitdiffstats
path: root/trie
diff options
context:
space:
mode:
Diffstat (limited to 'trie')
-rw-r--r--trie/node.go4
-rw-r--r--trie/trie.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/trie/node.go b/trie/node.go
index a06f1b389..1fafb7a53 100644
--- a/trie/node.go
+++ b/trie/node.go
@@ -55,7 +55,7 @@ var nilValueNode = valueNode(nil)
func (n *fullNode) EncodeRLP(w io.Writer) error {
var nodes [17]node
- for i, child := range n.Children {
+ for i, child := range &n.Children {
if child != nil {
nodes[i] = child
} else {
@@ -98,7 +98,7 @@ func (n valueNode) String() string { return n.fstring("") }
func (n *fullNode) fstring(ind string) string {
resp := fmt.Sprintf("[\n%s ", ind)
- for i, node := range n.Children {
+ for i, node := range &n.Children {
if node == nil {
resp += fmt.Sprintf("%s: <nil> ", indices[i])
} else {
diff --git a/trie/trie.go b/trie/trie.go
index 4284e30ad..e920ccd23 100644
--- a/trie/trie.go
+++ b/trie/trie.go
@@ -356,7 +356,7 @@ func (t *Trie) delete(n node, prefix, key []byte) (bool, node, error) {
// value that is left in n or -2 if n contains at least two
// values.
pos := -1
- for i, cld := range n.Children {
+ for i, cld := range &n.Children {
if cld != nil {
if pos == -1 {
pos = i