Skip to content

Commit

Permalink
match existing calls
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Jan 2, 2024
1 parent d4ee31d commit d38bf8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/env/src/engine/on_chain/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl EnvBackend for EnvInstance {
let mut buffer = self.scoped_buffer();
let key = buffer.take_encoded(key);
let value = buffer.take_storable_encoded(value);
ext::set_storage_v1(key, value)
ext::set_storage_v2(key, value)
}

fn get_contract_storage<K, R>(&mut self, key: &K) -> Result<Option<R>>
Expand All @@ -212,7 +212,7 @@ impl EnvBackend for EnvInstance {
let mut buffer = self.scoped_buffer();
let key = buffer.take_encoded(key);
let output = &mut buffer.take_rest();
match ext::get_storage(key, output) {
match ext::get_storage_v1(key, output) {
Ok(_) => (),
Err(ReturnErrorCode::KeyNotFound) => return Ok(None),
Err(_) => panic!("encountered unexpected error"),
Expand Down

0 comments on commit d38bf8f

Please sign in to comment.