mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
Add genesis config to Glutton pallet (#14188)
* glutton gensis config added * Glutton pallet updates (#14192) * Add admin origin and other fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove magic number Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Typo Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix genesis_build * Fix docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix kitchensink runtime Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix twox_256 * fmt * twox_256 clean * nitpick Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
@@ -43,8 +43,8 @@ fn initialize_pallet_works() {
|
||||
Error::<Test>::AlreadyInitialized
|
||||
);
|
||||
|
||||
assert_eq!(TrashData::<Test>::get(0), Some([0; 1024]));
|
||||
assert_eq!(TrashData::<Test>::get(1), Some([1; 1024]));
|
||||
assert_eq!(TrashData::<Test>::get(0), Some(Pallet::<Test>::gen_value(0)));
|
||||
assert_eq!(TrashData::<Test>::get(1), Some(Pallet::<Test>::gen_value(1)));
|
||||
assert_eq!(TrashData::<Test>::get(2), None);
|
||||
|
||||
assert_eq!(TrashDataCount::<Test>::get(), 2);
|
||||
@@ -224,3 +224,14 @@ fn waste_at_most_proof_size_weight_close_enough() {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gen_value_works() {
|
||||
let g0 = Pallet::<Test>::gen_value(0);
|
||||
let g1 = Pallet::<Test>::gen_value(1);
|
||||
|
||||
assert_eq!(g0.len(), VALUE_SIZE);
|
||||
assert_ne!(g0, g1, "Is distinct");
|
||||
assert_ne!(g0, [0; VALUE_SIZE], "Is not zero");
|
||||
assert_eq!(g0, Pallet::<Test>::gen_value(0), "Is deterministic");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user