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
fb6f3d78
Commit
fb6f3d78
authored
4 months ago
by
Pascal Engélibert
Committed by
Hugo Trentesaux
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
certification/benchmark: fix add_certs number
parent
91acf6cd
No related branches found
No related tags found
1 merge request
!310
Optimize do_remove_all_certs_received_by
Pipeline
#39554
skipped
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pallets/certification/src/benchmarking.rs
+3
-3
3 additions, 3 deletions
pallets/certification/src/benchmarking.rs
with
3 additions
and
3 deletions
pallets/certification/src/benchmarking.rs
+
3
−
3
View file @
fb6f3d78
...
@@ -37,11 +37,11 @@ mod benchmarks {
...
@@ -37,11 +37,11 @@ mod benchmarks {
fn
add_certs
<
T
:
Config
>
(
i
:
u32
,
receiver
:
T
::
IdtyIndex
)
->
Result
<
(),
&
'static
str
>
{
fn
add_certs
<
T
:
Config
>
(
i
:
u32
,
receiver
:
T
::
IdtyIndex
)
->
Result
<
(),
&
'static
str
>
{
Pallet
::
<
T
>
::
remove_all_certs_received_by
(
RawOrigin
::
Root
.into
(),
receiver
)
?
;
Pallet
::
<
T
>
::
remove_all_certs_received_by
(
RawOrigin
::
Root
.into
(),
receiver
)
?
;
for
j
in
1
..
i
{
for
j
in
1
..
i
+
1
{
Pallet
::
<
T
>
::
do_add_cert_checked
(
j
.into
(),
receiver
,
false
)
?
;
Pallet
::
<
T
>
::
do_add_cert_checked
(
j
.into
(),
receiver
,
false
)
?
;
}
}
assert!
(
assert!
(
CertsByReceiver
::
<
T
>
::
get
(
receiver
)
.len
()
as
u32
==
i
-
1
,
CertsByReceiver
::
<
T
>
::
get
(
receiver
)
.len
()
as
u32
==
i
,
"Certs not added"
,
"Certs not added"
,
);
);
Ok
(())
Ok
(())
...
@@ -167,7 +167,7 @@ mod benchmarks {
...
@@ -167,7 +167,7 @@ mod benchmarks {
Pallet
::
<
T
>
::
do_remove_all_certs_received_by
(
receiver
);
Pallet
::
<
T
>
::
do_remove_all_certs_received_by
(
receiver
);
}
}
for
issuer
in
1
..
i
{
for
issuer
in
1
..
i
+
1
{
assert_has_event
::
<
T
>
(
assert_has_event
::
<
T
>
(
Event
::
<
T
>
::
CertRemoved
{
Event
::
<
T
>
::
CertRemoved
{
issuer
:
issuer
.into
(),
issuer
:
issuer
.into
(),
...
...
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