mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 21:37:56 +00:00
pallet macro: always generate storage info on pallet struct (#9246)
* always implement storage info on Pallet * fix UI test * Fold span computation into trait and method computation Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f93074d086
commit
f96c5df754
@@ -397,6 +397,9 @@ pub mod pallet2 {
|
||||
{
|
||||
}
|
||||
|
||||
#[pallet::storage]
|
||||
pub type SomeValue<T: Config> = StorageValue<_, Vec<u32>>;
|
||||
|
||||
#[pallet::event]
|
||||
pub enum Event {
|
||||
/// Something
|
||||
@@ -1247,4 +1250,15 @@ fn test_storage_info() {
|
||||
},
|
||||
],
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
Example2::storage_info(),
|
||||
vec![
|
||||
StorageInfo {
|
||||
prefix: prefix(b"Example2", b"SomeValue"),
|
||||
max_values: Some(1),
|
||||
max_size: None,
|
||||
},
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user