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
b93329cb
Unverified
Commit
b93329cb
authored
1 year ago
by
bgallois
Browse files
Options
Downloads
Patches
Plain Diff
update client
parent
ade2e5cf
No related branches found
No related tags found
1 merge request
!252
Change distance evaluation period from Sessions to Blocks
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/distance/src/lib.rs
+4
-4
4 additions, 4 deletions
client/distance/src/lib.rs
with
4 additions
and
4 deletions
client/distance/src/lib.rs
+
4
−
4
View file @
b93329cb
...
@@ -52,7 +52,7 @@ where
...
@@ -52,7 +52,7 @@ where
.storage
(
.storage
(
parent
,
parent
,
&
StorageKey
(
&
StorageKey
(
frame_support
::
storage
::
storage_prefix
(
b"
Session
"
,
b"CurrentIndex"
)
.to_vec
(),
frame_support
::
storage
::
storage_prefix
(
b"
Distance
"
,
b"Current
Pool
Index"
)
.to_vec
(),
),
),
)
)
.expect
(
"CurrentIndex is Err"
)
.expect
(
"CurrentIndex is Err"
)
...
@@ -66,7 +66,7 @@ where
...
@@ -66,7 +66,7 @@ where
&
StorageKey
(
&
StorageKey
(
frame_support
::
storage
::
storage_prefix
(
frame_support
::
storage
::
storage_prefix
(
b"Distance"
,
b"Distance"
,
match
session_index
%
3
{
match
session_index
{
0
=>
b"StoragePublishedResults1"
,
0
=>
b"StoragePublishedResults1"
,
1
=>
b"StoragePublishedResults2"
,
1
=>
b"StoragePublishedResults2"
,
2
=>
b"StoragePublishedResults0"
,
2
=>
b"StoragePublishedResults0"
,
...
@@ -81,9 +81,9 @@ where
...
@@ -81,9 +81,9 @@ where
.expect
(
"cannot decode EvaluationPool"
)
.expect
(
"cannot decode EvaluationPool"
)
});
});
// Have we already published a result for this
sess
io
n
?
// Have we already published a result for this
per
io
d
?
if
published_results
.evaluators
.contains
(
&
owner_key
)
{
if
published_results
.evaluators
.contains
(
&
owner_key
)
{
log
::
debug!
(
"🧙 [distance oracle] Already published a result for this
sess
io
n
"
);
log
::
debug!
(
"🧙 [distance oracle] Already published a result for this
per
io
d
"
);
return
Ok
(
sp_distance
::
InherentDataProvider
::
<
IdtyIndex
>
::
new
(
None
));
return
Ok
(
sp_distance
::
InherentDataProvider
::
<
IdtyIndex
>
::
new
(
None
));
}
}
...
...
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