Skip to content

Commit

Permalink
Fix reward storage (#1368)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdossa committed Dec 22, 2022
1 parent 5893c1e commit 09e4e12
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polymesh"
version = "5.1.1"
version = "5.1.2"
authors = ["Polymath"]
build = "build.rs"
edition = "2021"
Expand Down
3 changes: 2 additions & 1 deletion pallets/rewards/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ decl_module! {

// Remove all storage for this module
fn on_runtime_upgrade() -> Weight {
use frame_support::sp_io::hashing;
sp_runtime::runtime_logger::RuntimeLogger::init();
log::info!(" >>> Removing reward pallet storage");
let reward_prefix = <ItnRewards<T>>::module_prefix();
let reward_prefix = hashing::twox_128(b"Rewards");
let _ = frame_support::storage::unhashed::kill_prefix(&reward_prefix, None);
log::info!(" >>> Reward pallet storage removed");
1_000
Expand Down

0 comments on commit 09e4e12

Please sign in to comment.