Calculate and refund weight for identity pallet (#5680)
* add old_registrar_count as param to estimate weight * cast count to Weight Co-Authored-By: Shawn Tabrizi <[email protected]> * add weight calculation for set_identity * remove superfluous weight comment * add detailed weight estimation for set_subs * adjust benchmarking code to the new API * add second parameter to set_subs benchmark * rename o to p * calculate weight based on benchmarks * use try_mutate for registrars * fix weight number typo * update weights for set_subs + add weights for clear_identity and request_judgement * improve naming and docs * add weight calculation for cancel_request * fix benchmark * fix tests * fix arithmetic overflow in balances triggered by tests * add weight calcluations for more dispatchables * add weight calculation for provide_judgement * mark param as unused * add MaxRegistrars associated type used for weight estimation * check that MaxRegistrars is not exceeded * add remaining weight calculations * use weight refunds to use more constants in weight estimation * adjust usage of clear_identity * refund request_judgement weights and remove param * refund weights for cancel_request and remove param * add remaining refunds and remove params * refund weight for set_subs and remove param * make comment more specific * add range note to benchmarking docs * fix inconsistencies before review * fix actual weight calculation for add_registrar * remove duplicate balance ops weights + refund on all dispatchables Co-authored-by: Shawn Tabrizi <[email protected]>
parent
f267590d
Please register or sign in to comment