Skip to content

Commit d4e9977

Browse files
authored
Refactor transaction payment (#1864)
* Reuse pallet-transaction-payment from Substrate, split our ChargeTransactionPayment code out. * Use improved transaction priority calculation from Substrate. * Implement support for disable fees. * Add benchmark of ChargeTransactionPayment tx extension. * Benchmark ChargeTransactionPayment extension. * Return the extension weight. * Use git paths instead of version for Substrate deps. * Update to Substrate release polkadot-stable2512. * Fix tests build.
1 parent 36bff6c commit d4e9977

26 files changed

+859
-1860
lines changed

.maintain/frame-weight-template.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ impl {{pallet}}::WeightInfo for SubstrateWeight {
4848
{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
4949
) -> Weight {
5050
// Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds.
51-
Weight::from_ref_time({{underscore benchmark.base_weight}})
51+
Weight::from_parts({{underscore benchmark.base_weight}}, 0)
5252
{{#each benchmark.component_weight as |cw|}}
5353
// Standard Error: {{underscore cw.error}}
54-
.saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into()))
54+
.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
5555
{{/each}}
5656
{{#if (ne benchmark.base_reads "0")}}
5757
.saturating_add(DbWeight::get().reads({{benchmark.base_reads}}))

0 commit comments

Comments
 (0)