Skip to content

Commit cc816f5

Browse files
authored
Merge pull request #9488 from ydm/patch-2
Simplify merkle radix tree pseudocode
2 parents f043b65 + c0db601 commit cc816f5

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The update and delete operations for radix tries can be defined as follows:
5555
newindex = delete(curnode[path[0]],path[1:])
5656
newnode[path[0]] = newindex
5757
58-
if len(filter(x -> x is not NULL, newnode)) == 0:
58+
if all(x is NULL for x in newnode):
5959
return NULL
6060
else:
6161
db.put(hash(newnode),newnode)

0 commit comments

Comments
 (0)