@@ -27,21 +27,22 @@ use frame_support::{
27
27
parameter_types,
28
28
traits:: {
29
29
tokens:: fungible, ConstU32 , ConstU64 , ConstU8 , Imbalance as ImbalanceT , OnUnbalanced ,
30
- StorageMapShim , StoredMap ,
30
+ StorageMapShim , StoredMap , WhitelistedStorageKeys ,
31
31
} ,
32
32
weights:: { IdentityFee , Weight } ,
33
33
RuntimeDebug ,
34
34
} ;
35
35
use frame_system:: { self as system, RawOrigin } ;
36
36
use pallet_transaction_payment:: { ChargeTransactionPayment , CurrencyAdapter , Multiplier } ;
37
37
use scale_info:: TypeInfo ;
38
- use sp_core:: H256 ;
38
+ use sp_core:: { hexdisplay :: HexDisplay , H256 } ;
39
39
use sp_io;
40
40
use sp_runtime:: {
41
41
testing:: Header ,
42
42
traits:: { BadOrigin , IdentityLookup , SignedExtension , Zero } ,
43
43
ArithmeticError , DispatchError , DispatchResult , FixedPointNumber , TokenError ,
44
44
} ;
45
+ use std:: collections:: BTreeSet ;
45
46
46
47
mod currency_tests;
47
48
mod dispatchable_tests;
@@ -304,3 +305,15 @@ fn weights_sane() {
304
305
let info = crate :: Call :: < Test > :: force_unreserve { who : 10 , amount : 4 } . get_dispatch_info ( ) ;
305
306
assert_eq ! ( <( ) as crate :: WeightInfo >:: force_unreserve( ) , info. weight) ;
306
307
}
308
+
309
+ #[ test]
310
+ fn check_whitelist ( ) {
311
+ let whitelist: BTreeSet < String > = AllPalletsWithSystem :: whitelisted_storage_keys ( )
312
+ . iter ( )
313
+ . map ( |s| HexDisplay :: from ( & s. key ) . to_string ( ) )
314
+ . collect ( ) ;
315
+ // Inactive Issuance
316
+ assert ! ( whitelist. contains( "c2261276cc9d1f8598ea4b6a74b15c2f1ccde6872881f893a21de93dfe970cd5" ) ) ;
317
+ // Total Issuance
318
+ assert ! ( whitelist. contains( "c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80" ) ) ;
319
+ }
0 commit comments