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

OnPeerDisconnected handler. #1369

Merged
merged 10 commits into from
Oct 18, 2022
Merged

Conversation

iceseer
Copy link
Contributor

@iceseer iceseer commented Oct 13, 2022

Signed-off-by: iceseer [email protected]

Description of the Change

OnPeerDisconnected event handling. Revove our current states by this event.

@iceseer iceseer force-pushed the fix/on_peer_disconnected_event_handling branch from e4cf623 to fdd80d2 Compare October 13, 2022 16:43
@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Merging #1369 (0b3c63f) into master (ebd9715) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #1369   +/-   ##
=======================================
  Coverage   24.15%   24.15%           
=======================================
  Files         627      627           
  Lines       23464    23459    -5     
  Branches    12267    12262    -5     
=======================================
  Hits         5667     5667           
+ Misses      12522    12517    -5     
  Partials     5275     5275           
Impacted Files Coverage Δ
core/network/impl/peer_manager_impl.cpp 3.11% <0.00%> (+0.03%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: iceseer <[email protected]>
Copy link
Contributor

@kamilsa kamilsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check if soft_limit is needed at all after the changes. If not, please remove it from peering config

Signed-off-by: iceseer <[email protected]>
Signed-off-by: iceseer <[email protected]>
Signed-off-by: iceseer <[email protected]>
@iceseer iceseer force-pushed the fix/on_peer_disconnected_event_handling branch from 44f3a06 to 99de27b Compare October 17, 2022 07:22
@xDimon xDimon self-requested a review October 18, 2022 08:34
@iceseer
Copy link
Contributor Author

iceseer commented Oct 18, 2022

Я вернул проверку на существование в active_peers_ перед удалением, т.е. теперь удалится только если перешел из connecting_peers_ в active_peers_. Но имхо теперь есть неоднозначность и возможная неконсистентность с состоянием в libp2p. Мы вызвали удаление и libp2p все почистил, вызвал колбэк, а мы не удалили. Выглядит как будто у нас была ошибка раньше

@iceseer iceseer merged commit 58b2272 into master Oct 18, 2022
@iceseer iceseer deleted the fix/on_peer_disconnected_event_handling branch October 18, 2022 09:47
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