Skip to content
Snippets Groups Projects
Commit 8d6d1f7f authored by Éloïs's avatar Éloïs
Browse files

fix(pallet-randomness): RequestsId should be pruned

parent eedb2c52
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,7 @@ pub mod pallet {
let randomness = T::CurrentBlockRandomness::random(salt.as_ref())
.0
.unwrap_or_default();
RequestsIds::<T>::remove(request_id);
total_weight += T::OnFilledRandomness::on_filled_randomness(request_id, randomness);
Self::deposit_event(Event::FilledRandomness {
request_id,
......@@ -189,6 +190,7 @@ pub mod pallet {
RequestsReadyAtEpoch::<T>::take(T::GetCurrentEpochIndex::get())
{
let randomness = T::RandomnessFromOneEpochAgo::random(salt.as_ref()).0;
RequestsIds::<T>::remove(request_id);
total_weight +=
T::OnFilledRandomness::on_filled_randomness(request_id, randomness);
Self::deposit_event(Event::FilledRandomness {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment