You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current impl of pallet_collator_selection::set_candidacy_bond charges for both the length of the candidate list as well as the number of candidates kicked as a result of a higher bond being imposed on them and their existing bonds not meeting the new requirements.
However, when the candidacy bond decreases, there are no iterations on the list, but we still charge for the length of the candidate list as if we iterated over all the candidates but kicked none. In this particular case, we should refund weight as if the list was empty. This needs to be fixed in pallet_collator_selection::set_candidacy_bond.
The text was updated successfully, but these errors were encountered:
Fixes#3642
This PR implements the weight refund of
`pallet_collator_selection::set_candidacy_bond` to account for no
iterations when the bond is decreased.
---------
Signed-off-by: georgepisaltu <george.pisaltu@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
…tytech#3643)
Fixesparitytech#3642
This PR implements the weight refund of
`pallet_collator_selection::set_candidacy_bond` to account for no
iterations when the bond is decreased.
---------
Signed-off-by: georgepisaltu <george.pisaltu@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
The current impl of
pallet_collator_selection::set_candidacy_bond
charges for both the length of the candidate list as well as the number of candidates kicked as a result of a higher bond being imposed on them and their existing bonds not meeting the new requirements.However, when the candidacy bond decreases, there are no iterations on the list, but we still charge for the length of the candidate list as if we iterated over all the candidates but kicked none. In this particular case, we should refund weight as if the list was empty. This needs to be fixed in
pallet_collator_selection::set_candidacy_bond
.The text was updated successfully, but these errors were encountered: