mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
move storage keys computation to primitivs (#1254)
This commit is contained in:
committed by
Bastian Köcher
parent
3aff81a707
commit
22b1e456ab
@@ -95,9 +95,6 @@ pub mod weights_ext;
|
||||
|
||||
pub use pallet::*;
|
||||
|
||||
/// Name of the `PendingSwaps` storage map.
|
||||
pub const PENDING_SWAPS_MAP_NAME: &str = "PendingSwaps";
|
||||
|
||||
// comes from #[pallet::event]
|
||||
#[allow(clippy::unused_unit)]
|
||||
#[frame_support::pallet]
|
||||
@@ -639,7 +636,7 @@ pub mod pallet {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::mock::*;
|
||||
use frame_support::{assert_noop, assert_ok};
|
||||
use frame_support::{assert_noop, assert_ok, storage::generator::StorageMap};
|
||||
|
||||
const CAN_START_BLOCK_NUMBER: u64 = 10;
|
||||
const CAN_CLAIM_BLOCK_NUMBER: u64 = CAN_START_BLOCK_NUMBER + 1;
|
||||
@@ -1130,4 +1127,12 @@ mod tests {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn storage_keys_computed_properly() {
|
||||
assert_eq!(
|
||||
PendingSwaps::<TestRuntime>::storage_map_final_key(test_swap_hash()),
|
||||
bp_token_swap::storage_keys::pending_swaps_key("TokenSwap", test_swap_hash()).0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user