We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b79c69 commit c6ed486Copy full SHA for c6ed486
core/src/ibc/context.rs
@@ -81,8 +81,13 @@ impl<'a> KVStore for TopLevelKVStore<'a> {
81
}
82
83
fn insert(&mut self, path: Path, value: &[u8]) -> Option<Bytes> {
84
+ // FIXME: the update_ibc_data returns the previous data.
85
+ // When the previous data is empty, it should return None.
86
+ // Currently it is returning an empty RLP array.
87
+ let prev = self.get(path);
88
let key = TopLevelKVStore::key(path);
- self.state.update_ibc_data(&key, value.to_vec()).expect("Set in IBC KVStore").map(Bytes::from)
89
+ self.state.update_ibc_data(&key, value.to_vec()).expect("Set in IBC KVStore");
90
+ prev
91
92
93
fn remove(&mut self, path: Path) -> Option<Bytes> {
0 commit comments