You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting the value of an IAVL key to the empty string deletes it, resulting in subsequent absence from "keys" results even if the key itself has children.
To Reproduce
It is not yet possible to manipulate arbitrary IAVL data, but this is the sequence of steps to expose the bug:
Set data for key "foo.bar.baz" to a nonempty value, e.g. "qux".
Observe that the results of RPC call Keys for key "foo" include "bar", and that the results of RPC call Keys for key "foo.bar" include "baz".
Observe that the results of RPC call Storage for key "foo.bar.baz" are value "qux".
Set the data for key "foo.bar" to empty.
Observe that the results of RPC call Keys for key "foo" include "bar".
Observe that the results of RPC call Storage for key "foo.bar.baz" are still value "qux" (i.e., that key "foo.bar.baz" still exists and has data even though it is not reported by RPC call Keys for key "foo.bar").
Expected behavior
Given the unusual behavior that setting a key's data to empty is treated as deletion, attempting such an operation on a key that has children should either a) fail or b) leave the key present under its parent. I'm inclined towards option b.
The text was updated successfully, but these errors were encountered:
Describe the bug
Setting the value of an IAVL key to the empty string deletes it, resulting in subsequent absence from "keys" results even if the key itself has children.
To Reproduce
It is not yet possible to manipulate arbitrary IAVL data, but this is the sequence of steps to expose the bug:
Expected behavior
Given the unusual behavior that setting a key's data to empty is treated as deletion, attempting such an operation on a key that has children should either a) fail or b) leave the key present under its parent. I'm inclined towards option b.
The text was updated successfully, but these errors were encountered: