Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Feb 9, 2023
1 parent eb882f3 commit 7b6d9ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frame/scheduler/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ fn scheduler_handles_periodic_unavailable_preimage() {
let call = RuntimeCall::Logger(LoggerCall::log { i: 42, weight: (max_weight / 3) * 2 });
let hash = <Test as frame_system::Config>::Hashing::hash_of(&call);
let len = call.using_encoded(|x| x.len()) as u32;
// Important to use here `Bounded::Lookup` to ensure that we request the hash.
let bound = Bounded::Lookup { hash, len };
// The preimage isn't requested yet.
assert!(!Preimage::is_requested(&hash));
Expand Down Expand Up @@ -508,6 +509,9 @@ fn scheduler_handles_periodic_unavailable_preimage() {
// Does not ever execute again.
run_to_block(100);
assert_eq!(logger::log().len(), 1);

// The preimage is not requested anymore.
assert!(!Preimage::is_requested(&hash));
});
}

Expand Down

0 comments on commit 7b6d9ee

Please sign in to comment.