mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 22:05:42 +00:00
Add code blocks to doc diagrams (#8118)
This commit is contained in:
@@ -129,6 +129,7 @@ pub struct WeightsPerClass {
|
|||||||
/// `on_initialize` pallet callbacks are invoked and their cost is added before any extrinsic
|
/// `on_initialize` pallet callbacks are invoked and their cost is added before any extrinsic
|
||||||
/// is executed. This cost is tracked as `Mandatory` dispatch class.
|
/// is executed. This cost is tracked as `Mandatory` dispatch class.
|
||||||
///
|
///
|
||||||
|
/// ```ignore
|
||||||
/// | | `max_block` | |
|
/// | | `max_block` | |
|
||||||
/// | | | |
|
/// | | | |
|
||||||
/// | | | |
|
/// | | | |
|
||||||
@@ -139,12 +140,15 @@ pub struct WeightsPerClass {
|
|||||||
/// ||\_ Mandatory
|
/// ||\_ Mandatory
|
||||||
/// |\__ Operational
|
/// |\__ Operational
|
||||||
/// \___ Normal
|
/// \___ Normal
|
||||||
|
/// ```
|
||||||
///
|
///
|
||||||
/// The remaining capacity can be used to dispatch extrinsics. Note that each dispatch class
|
/// The remaining capacity can be used to dispatch extrinsics. Note that each dispatch class
|
||||||
/// is being tracked separately, but the sum can't exceed `max_block` (except for `reserved`).
|
/// is being tracked separately, but the sum can't exceed `max_block` (except for `reserved`).
|
||||||
/// Below you can see a picture representing full block with 3 extrinsics (two `Operational` and
|
/// Below you can see a picture representing full block with 3 extrinsics (two `Operational` and
|
||||||
/// one `Normal`). Each class has it's own limit `max_total`, but also the sum cannot exceed
|
/// one `Normal`). Each class has it's own limit `max_total`, but also the sum cannot exceed
|
||||||
/// `max_block` value.
|
/// `max_block` value.
|
||||||
|
///
|
||||||
|
/// ```ignore
|
||||||
/// -- `Mandatory` limit (unlimited)
|
/// -- `Mandatory` limit (unlimited)
|
||||||
/// | # | | |
|
/// | # | | |
|
||||||
/// | # | `Ext3` | - - `Operational` limit
|
/// | # | `Ext3` | - - `Operational` limit
|
||||||
@@ -153,6 +157,7 @@ pub struct WeightsPerClass {
|
|||||||
/// | #| `on_initialize` | ##|
|
/// | #| `on_initialize` | ##|
|
||||||
/// | #| `base_block` |###|
|
/// | #| `base_block` |###|
|
||||||
/// |NOM| |NOM|
|
/// |NOM| |NOM|
|
||||||
|
/// ```
|
||||||
///
|
///
|
||||||
/// It should be obvious now that it's possible for one class to reach it's limit (say `Normal`),
|
/// It should be obvious now that it's possible for one class to reach it's limit (say `Normal`),
|
||||||
/// while the block has still capacity to process more transactions (`max_block` not reached,
|
/// while the block has still capacity to process more transactions (`max_block` not reached,
|
||||||
@@ -164,6 +169,8 @@ pub struct WeightsPerClass {
|
|||||||
/// full. For instance one might want to prevent high-priority `Normal` transactions from pushing
|
/// full. For instance one might want to prevent high-priority `Normal` transactions from pushing
|
||||||
/// out lower-priority `Operational` transactions. In such cases you might add a `reserved` capacity
|
/// out lower-priority `Operational` transactions. In such cases you might add a `reserved` capacity
|
||||||
/// for given class.
|
/// for given class.
|
||||||
|
///
|
||||||
|
/// ```ignore
|
||||||
/// _
|
/// _
|
||||||
/// # \
|
/// # \
|
||||||
/// # `Ext8` - `reserved`
|
/// # `Ext8` - `reserved`
|
||||||
@@ -175,6 +182,7 @@ pub struct WeightsPerClass {
|
|||||||
/// | #| `on_initialize` |###|
|
/// | #| `on_initialize` |###|
|
||||||
/// | #| `base_block` |###|
|
/// | #| `base_block` |###|
|
||||||
/// |NOM| |NOM|
|
/// |NOM| |NOM|
|
||||||
|
/// ```
|
||||||
///
|
///
|
||||||
/// In the above example, `Ext4-6` fill up the block almost up to `max_block`. `Ext7` would not fit
|
/// In the above example, `Ext4-6` fill up the block almost up to `max_block`. `Ext7` would not fit
|
||||||
/// if there wasn't the extra `reserved` space for `Operational` transactions. Note that `max_total`
|
/// if there wasn't the extra `reserved` space for `Operational` transactions. Note that `max_total`
|
||||||
|
|||||||
Reference in New Issue
Block a user