Skip to content

Commit

Permalink
Use range_keys in burner contract
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Aug 25, 2023
1 parent 7ee3ebf commit 28459fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/burner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"]

[dependencies]
cosmwasm-schema = { path = "../../packages/schema" }
cosmwasm-std = { path = "../../packages/std", features = ["iterator"] }
cosmwasm-std = { path = "../../packages/std", features = ["iterator", "cosmwasm_1_4"] }
schemars = "0.8.3"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }

Expand Down
3 changes: 1 addition & 2 deletions contracts/burner/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ pub fn execute_cleanup(
let take_this_scan = std::cmp::min(PER_SCAN, limit);
let keys: Vec<_> = deps
.storage
.range(None, None, Order::Ascending)
.range_keys(None, None, Order::Ascending)
.take(take_this_scan)
.map(|(k, _)| k)
.collect();
let deleted_this_scan = keys.len();
for k in keys {
Expand Down

0 comments on commit 28459fa

Please sign in to comment.