Skip to content

Commit 1ea7305

Browse files
committed
Update to cosmwasm 2.2
1 parent 8a26f8d commit 1ea7305

File tree

4 files changed

+16
-21
lines changed

4 files changed

+16
-21
lines changed

libwasmvm/Cargo.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libwasmvm/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ default = []
2626
backtraces = []
2727

2828
[dependencies]
29-
cosmwasm-std = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.2.0-rc.3", features = [
29+
cosmwasm-std = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.2.0", features = [
3030
"staking",
3131
"stargate",
3232
"iterator",
3333
] }
34-
cosmwasm-vm = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.2.0-rc.3", features = [
34+
cosmwasm-vm = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.2.0", features = [
3535
"staking",
3636
"stargate",
3737
"iterator",

libwasmvm/src/cache.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,7 @@ fn do_save_wasm(
7272
unchecked: bool,
7373
) -> Result<Checksum, Error> {
7474
let wasm = wasm.read().ok_or_else(|| Error::unset_arg(WASM_ARG))?;
75-
let checksum = if unchecked {
76-
cache.save_wasm_unchecked(wasm)?
77-
} else {
78-
cache.save_wasm(wasm)?
79-
};
80-
Ok(checksum)
75+
Ok(cache.store_code(wasm, !unchecked, true)?)
8176
}
8277

8378
#[no_mangle]

libwasmvm/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn handle_cpu_loop_with_cache() {
2929
};
3030

3131
// store code
32-
let checksum = cache.save_wasm(CYBERPUNK).unwrap();
32+
let checksum = cache.store_code(CYBERPUNK, true, true).unwrap();
3333

3434
// instantiate
3535
let env = mock_env();

0 commit comments

Comments
 (0)