pub trait ReportAuthoredBlocks<AccountId> {
// Required method
fn report(blocks: &[(AccountId, u32)]) -> Result<(), ()>;
// Provided methods
fn message_size(blocks: &[(AccountId, u32)]) -> usize
where AccountId: Encode { ... }
fn max_message_size() -> Option<usize> { ... }
fn ensure_successful_report(_blocks: &[(AccountId, u32)]) { ... }
}Expand description
Delivers the block counts of one report.
Required Methods§
Provided Methods§
Sourcefn message_size(blocks: &[(AccountId, u32)]) -> usizewhere
AccountId: Encode,
fn message_size(blocks: &[(AccountId, u32)]) -> usizewhere
AccountId: Encode,
The encoded size of what Self::report sends for blocks.
By default the encoded blocks, as if the transport added nothing: an XCM envelope adds a
few bytes. Checked against Self::max_message_size in the pallet’s integrity_test.
Sourcefn max_message_size() -> Option<usize>
fn max_message_size() -> Option<usize>
The largest message the transport accepts, None without a limit, as for a local credit.
Sourcefn ensure_successful_report(_blocks: &[(AccountId, u32)])
fn ensure_successful_report(_blocks: &[(AccountId, u32)])
Prepare the runtime so that Self::report succeeds for blocks in benchmarks.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<AccountId> ReportAuthoredBlocks<AccountId> for ()
Discards the counts.
impl<AccountId> ReportAuthoredBlocks<AccountId> for ()
Discards the counts.