Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix can disconnect #2149

Merged
merged 11 commits into from
Jul 22, 2024
Merged

fix can disconnect #2149

merged 11 commits into from
Jul 22, 2024

Conversation

turuslan
Copy link
Contributor

@turuslan turuslan commented Jul 5, 2024

Referenced issues

Description of the Change

  • fix inconsistent PeerState.use_count increment/decrement (caused assert)
    • was incremented when opening stream
    • was decremented when cached session became unused
  • remove PeerState.use_count
    • add separate peer_use_count map, which isn't changed when peers disconnect

Possible Drawbacks

Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested review from xDimon and iceseer July 5, 2024 15:09
@turuslan turuslan requested a review from Harrm July 5, 2024 15:25
@kamilsa kamilsa removed the request for review from xDimon July 15, 2024 08:53
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>

# Conflicts:
#	core/parachain/pvf/kagome_pvf_worker_injector.hpp
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
core/runtime/common/module_instance.cpp Outdated Show resolved Hide resolved
core/runtime/common/module_instance.cpp Outdated Show resolved Hide resolved
@turuslan turuslan requested a review from Harrm July 22, 2024 06:33
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan merged commit af3bc29 into master Jul 22, 2024
12 of 14 checks passed
@turuslan turuslan deleted the fix/peer-use-count branch July 22, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants