Skip to content

Commit ee66031

Browse files
Update index.md
I replaced the node parameter with node_hash to remove ambiguity.
1 parent 81b80c6 commit ee66031

File tree

1 file changed

+4
-4
lines changed
  • public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie

1 file changed

+4
-4
lines changed

public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ There is a difference between looking something up in the 'trie' and the underly
3434
The update and delete operations for radix tries can be defined as follows:
3535

3636
```
37-
def update(node,path,value):
38-
curnode = db.get(node) if node else [ NULL ] * 17
37+
def update(node_hash,path,value):
38+
curnode = db.get(node_hash) if node else [ NULL ] * 17
3939
newnode = curnode.copy()
4040
if path == '':
4141
newnode[-1] = value
@@ -45,11 +45,11 @@ The update and delete operations for radix tries can be defined as follows:
4545
db.put(hash(newnode),newnode)
4646
return hash(newnode)
4747
48-
def delete(node,path):
48+
def delete(node_hash,path):
4949
if node is NULL:
5050
return NULL
5151
else:
52-
curnode = db.get(node)
52+
curnode = db.get(node_hash)
5353
newnode = curnode.copy()
5454
if path == '':
5555
newnode[-1] = NULL

0 commit comments

Comments
 (0)