Skip to content
Snippets Groups Projects
Unverified Commit 67b1e8f8 authored by bgallois's avatar bgallois
Browse files

fix no weight

parent 7a0d89d1
No related branches found
No related tags found
1 merge request!222Automatic weights documentation
Pipeline #35206 passed
......@@ -100,7 +100,7 @@ Cancel a named scheduled task.
<details><summary><code>schedule_after(after, maybe_periodic, priority, call)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
after: T::BlockNumber
......@@ -117,7 +117,7 @@ Anonymously schedule a task after a delay.
<details><summary><code>schedule_named_after(id, after, maybe_periodic, priority, call)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
id: TaskName
......@@ -137,7 +137,7 @@ Schedule a named task after a delay.
<details><summary><code>report_equivocation(equivocation_proof, key_owner_proof)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
equivocation_proof: Box<EquivocationProof<T::Header>>
......@@ -178,7 +178,7 @@ The dispatch origin for this call must be `Signed` by the transactor.
<details><summary><code>set_balance_deprecated(who, new_free, old_reserved)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
who: AccountIdLookupOf<T>
......@@ -248,7 +248,7 @@ The dispatch origin of this call must be Signed.
<details><summary><code>transfer(dest, value)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
dest: AccountIdLookupOf<T>
......@@ -265,7 +265,7 @@ WARNING: DEPRECATED! Will be released in approximately 3 months.
<details><summary><code>force_set_balance(who, new_free)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
who: AccountIdLookupOf<T>
......@@ -407,7 +407,7 @@ remove an identity from the blacklist
<details><summary><code>report_equivocation(equivocation_proof, key_owner_proof)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
equivocation_proof: Box<EquivocationProof<T::Hash, T::BlockNumber>>
......@@ -427,7 +427,7 @@ will be reported.
<details><summary><code>dispatch_as_root_unchecked_weight(call, weight)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
call: Box<<T as Config>::Call>
......@@ -542,7 +542,7 @@ Origin must be a member of the collective.
<details><summary><code>propose(threshold, proposal, length_bound)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
threshold: MemberCount
......@@ -595,7 +595,7 @@ fee.
<details><summary><code>close(proposal_hash, index, proposal_weight_bound, length_bound)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
proposal_hash: T::Hash
......@@ -991,7 +991,7 @@ The origin must be allow to certify.
<details><summary><code>create_swap(target, hashed_proof, action, duration)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
target: T::AccountId
......@@ -1019,7 +1019,7 @@ The dispatch origin for this call must be _Signed_.
<details><summary><code>claim_swap(proof, action)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
proof: Vec<u8>
......@@ -1040,7 +1040,7 @@ The dispatch origin for this call must be _Signed_.
<details><summary><code>cancel_swap(target, hashed_proof)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
target: T::AccountId
......@@ -1088,7 +1088,7 @@ O(Z + C) where Z is the length of the call and C its execution weight.
<details><summary><code>as_multi(threshold, other_signatories, maybe_timepoint, call, max_weight)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
threshold: u16
......@@ -1144,7 +1144,7 @@ may be found in the deposited `MultisigExecuted` event.
<details><summary><code>approve_as_multi(threshold, other_signatories, maybe_timepoint, call_hash, max_weight)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
threshold: u16
......@@ -1617,7 +1617,7 @@ includes bypassing `frame_system::Config::BaseCallFilter`).
<details><summary><code>with_weight(call, weight)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
call: Box<<T as Config>::RuntimeCall>
......@@ -1729,7 +1729,7 @@ Set the number of pages in the WebAssembly environment's heap.
<details><summary><code>set_code(code)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
code: Vec<u8>
......@@ -1746,7 +1746,7 @@ Set the new runtime code.
<details><summary><code>set_code_without_checks(code)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
code: Vec<u8>
......@@ -1811,7 +1811,7 @@ the prefix we are removing to accurately calculate the weight of this function.
<details><summary><code>plan_config_change(config)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
config: NextConfigDescriptor
......@@ -1882,7 +1882,7 @@ remove an identity from the set of authorities
<details><summary><code>note_stalled(delay, best_finalized_block_number)</code></summary>
Taking 0 % of a block.
No weight available.
```rust
delay: T::BlockNumber
......
......@@ -11,9 +11,11 @@ There are **{{ calls_counter }}** {{ category_name }} calls from **{{ pallets |
{{ param.name }}{% if loop.last != true %}, {% endif %}
{%- endfor -%}
)</code></summary>
Taking {{ call.weight}} % of a block.
{% if call.weight == -1 %}
No weight available.
{% else %}
Taking {{ call.weight }} % of a block.
{% endif %}
```rust
{% for param in call.params -%}
{{ param.name }}: {{ param.type_name }}
......
......@@ -300,7 +300,7 @@ pub(super) fn gen_doc() -> Result<()> {
weights.insert("AtomicSwap".to_string(), Default::default()); // No weight
// Insert weights for each call of each pallet.
// If no weight is available, the weight is set to 0.
// If no weight is available, the weight is set to -1.
// We use the relative weight in percent computed as the extrinsic base +
// the extrinsic execution divided by the total weight available in
// one block. If the weight depends on a complexity parameter,
......@@ -312,7 +312,7 @@ pub(super) fn gen_doc() -> Result<()> {
.get(&pallet.name)
.expect(&("No weight for ".to_owned() + &pallet.name))
.get(&call.name)
.map_or(0f64, |weight| {
.map_or(-1f64, |weight| {
(weight.relative_weight * 10000.).round() / 10000.
})
})
......
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