File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ There is a difference between looking something up in the 'trie' and the underly
34
34
The update and delete operations for radix tries can be defined as follows:
35
35
36
36
```
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
39
39
newnode = curnode.copy()
40
40
if path == '':
41
41
newnode[-1] = value
@@ -45,11 +45,11 @@ The update and delete operations for radix tries can be defined as follows:
45
45
db.put(hash(newnode),newnode)
46
46
return hash(newnode)
47
47
48
- def delete(node ,path):
48
+ def delete(node_hash ,path):
49
49
if node is NULL:
50
50
return NULL
51
51
else:
52
- curnode = db.get(node )
52
+ curnode = db.get(node_hash )
53
53
newnode = curnode.copy()
54
54
if path == '':
55
55
newnode[-1] = NULL
You can’t perform that action at this time.
0 commit comments