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

add const documentation

parent 84417ec3
No related branches found
No related tags found
1 merge request!222Automatic weights documentation
......@@ -11,10 +11,15 @@ use subweight_core::parse::storage::Weights;
use subweight_core::scope::Scope;
use subweight_core::term::Term;
// Substrate default maximum weight of a block in nanoseconds.
// Since the maximum block weight is one-third of the execution time,
// it corresponds to a block time of 6 seconds.
const MAX_BLOCK_WEIGHT_NS: f64 = 2_000_000_000_000.;
pub struct MaxBlockWeight(f64);
impl Default for MaxBlockWeight {
fn default() -> Self {
MaxBlockWeight(2_000_000_000_000.)
MaxBlockWeight(MAX_BLOCK_WEIGHT_NS)
}
}
impl Div<&MaxBlockWeight> for f64 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment