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

update client

parent ade2e5cf
No related branches found
No related tags found
1 merge request!252Change distance evaluation period from Sessions to Blocks
......@@ -52,7 +52,7 @@ where
.storage(
parent,
&StorageKey(
frame_support::storage::storage_prefix(b"Session", b"CurrentIndex").to_vec(),
frame_support::storage::storage_prefix(b"Distance", b"CurrentPoolIndex").to_vec(),
),
)
.expect("CurrentIndex is Err")
......@@ -66,7 +66,7 @@ where
&StorageKey(
frame_support::storage::storage_prefix(
b"Distance",
match session_index % 3 {
match session_index {
0 => b"StoragePublishedResults1",
1 => b"StoragePublishedResults2",
2 => b"StoragePublishedResults0",
......@@ -81,9 +81,9 @@ where
.expect("cannot decode EvaluationPool")
});
// Have we already published a result for this session?
// Have we already published a result for this period?
if published_results.evaluators.contains(&owner_key) {
log::debug!("🧙 [distance oracle] Already published a result for this session");
log::debug!("🧙 [distance oracle] Already published a result for this period");
return Ok(sp_distance::InherentDataProvider::<IdtyIndex>::new(None));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment