mirror of
https://github.com/status-im/research.git
synced 2025-01-15 17:46:52 +00:00
Merge pull request #76 from NIC619/fix_bin_trie_update_child_leaf_node
Fix bin trie update child leaf node
This commit is contained in:
commit
ccdadfd1b1
@ -182,7 +182,7 @@ def _update(db, node, keypath, val):
|
||||
if subnodetype == KV_TYPE:
|
||||
return hash_and_save(db, encode_kv_node(first_bit + subL, subR))
|
||||
# kv node pointing to a branch node
|
||||
elif subnodetype == BRANCH_TYPE:
|
||||
elif subnodetype == BRANCH_TYPE or subnodetype == LEAF_TYPE:
|
||||
return hash_and_save(db, encode_kv_node(first_bit, newL or newR))
|
||||
else:
|
||||
return hash_and_save(db, encode_branch_node(newL, newR))
|
||||
|
Loading…
x
Reference in New Issue
Block a user