Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into gui-finally-improve…
…-call
  • Loading branch information
gui1117 committed Jul 27, 2021
commit 0ef94bbffe6180a4c7a4328b2ade1004e8c56a16
13 changes: 12 additions & 1 deletion frame/election-provider-multi-phase/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,18 @@ pub mod pallet {

// create the submission
let deposit = Self::deposit_for(&solution, size);
let submission = SignedSubmission { who: who.clone(), deposit, solution: *solution };
let reward = {
let call = Call::submit(solution.clone(), num_signed_submissions);
let call_fee = T::EstimateCallFee::estimate_call_fee(&call, None.into());
T::SignedRewardBase::get().saturating_add(call_fee)
};

let submission = SignedSubmission {
who: who.clone(),
deposit,
solution: *solution,
reward,
};

// insert the submission if the queue has space or it's better than the weakest
// eject the weakest if the queue was full
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.