Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter v2S
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
Duniter v2S
Commits
56dcf1da
Unverified
Commit
56dcf1da
authored
1 year ago
by
bgallois
Browse files
Options
Downloads
Patches
Plain Diff
add const documentation
parent
d6fd10b6
No related branches found
No related tags found
No related merge requests found
Pipeline
#35199
passed
1 year ago
Stage: labels
Stage: quality
Stage: build
Stage: tests
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/weight_analyzer/src/lib.rs
+6
-1
6 additions, 1 deletion
resources/weight_analyzer/src/lib.rs
with
6 additions
and
1 deletion
resources/weight_analyzer/src/lib.rs
+
6
−
1
View file @
56dcf1da
...
@@ -11,10 +11,15 @@ use subweight_core::parse::storage::Weights;
...
@@ -11,10 +11,15 @@ use subweight_core::parse::storage::Weights;
use
subweight_core
::
scope
::
Scope
;
use
subweight_core
::
scope
::
Scope
;
use
subweight_core
::
term
::
Term
;
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
);
pub
struct
MaxBlockWeight
(
f64
);
impl
Default
for
MaxBlockWeight
{
impl
Default
for
MaxBlockWeight
{
fn
default
()
->
Self
{
fn
default
()
->
Self
{
MaxBlockWeight
(
2_000_000_000_000.
)
MaxBlockWeight
(
MAX_BLOCK_WEIGHT_NS
)
}
}
}
}
impl
Div
<&
MaxBlockWeight
>
for
f64
{
impl
Div
<&
MaxBlockWeight
>
for
f64
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment