-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Refactor and fix usage of get_session_index() and get_session_info_by_index()
#4735
Conversation
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
drahnr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits, one item that requires explaining, other than that LGTM
Signed-off-by: Andrei Sandu <[email protected]>
eskimor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far.
|
Here we are not actually using the So the comment is correct, but it does not matter as we don't lookup the leaf's session, but its child session. I am not 100% sure how to fix this properly. We could use the What should work more reliably even with @slumber 's and asynchronous backing would be to just lookup the session for the leaf for real. An API in |
since we cache session info per index, this shouldn't happen in practice |
but the index lookup might fail. |
right, but it's also cached per relay_parent |
…/session_index Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
ordian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't checked all the places where we fetch session index, but the ones modified in this PR look good.
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
Signed-off-by: Andrei Sandu <[email protected]>
|
bot merge |
* master: Fix incomplete sorting. (#4795) Companion for better way to resolve `Phase::Emergency` via governance #10663 (#4757) Refactor and fix usage of `get_session_index()` and `get_session_info_by_index()` (#4735) `relay chain selection` and `dispute-coordinator` fixes and improvements (#4752) Fix tests (#4787) log concluded disputes (#4785) availability-distribution: look for leaf ancestors within the same session (#4596) Companion for Use proper bounded vector type for nominations #10601 (#4709) Fix release profile (#4778) [ci] remove publish-s3-release (#4779) Companion for substrate#10632 (#4689) [ci] pipeline chores (#4775) New changelog scripts (#4491)
Fixes #4733
WIP