mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
[pallet-broker] Use saturating math in input validation (#4151)
Changes: - Saturate in the input validation of he drop history function or pallet-broker. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
4b5c3fd0cb
commit
8891b70fe2
@@ -146,6 +146,7 @@ fn drop_history_works() {
|
||||
advance_to(16);
|
||||
assert_eq!(InstaPoolHistory::<Test>::iter().count(), 6);
|
||||
advance_to(17);
|
||||
assert_noop!(Broker::do_drop_history(u32::MAX), Error::<Test>::StillValid);
|
||||
assert_noop!(Broker::do_drop_history(region.begin), Error::<Test>::StillValid);
|
||||
advance_to(18);
|
||||
assert_eq!(InstaPoolHistory::<Test>::iter().count(), 6);
|
||||
|
||||
Reference in New Issue
Block a user