Conversation
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
kamilsa
approved these changes
Dec 23, 2024
igor-egorov
approved these changes
Dec 23, 2024
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
0f740a0 to
7454f00
Compare
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new configuration parameter, maxPeers, along with associated updates across tests, application configuration, and peer management. Key changes include:
- Adding the maxPeers method to application configuration and its mock.
- Updating peer alignment in PeerManagerImpl to use the new maxPeers limit.
- Adjusting stream connection calls and updating toolchain/test configurations.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/mock/core/application/app_configuration_mock.hpp | Added a new mock method, maxPeers, for configuration consistency. |
| test/core/network/rpc_libp2p_test.cpp | Updated newStream call parameters to pass full peer_info instead of just peer_info_.id. |
| core/network/impl/protocols/request_response_protocol.hpp | Simplified the asynchronous callback by removing the timeout parameter. |
| core/network/impl/peer_manager_impl.hpp / .cpp | Introduced the collectGarbage method and updated align() logic to use app_config_.maxPeers(). |
| core/application/impl/app_configuration_impl.hpp, core/application/impl/app_configuration_impl.cpp, core/application/app_configuration.hpp | Added and integrated the maxPeers configuration parameter throughout the application. |
| cmake/toolchain/flags/sanitize_thread.cmake, cmake/functions.cmake, cmake/Hunter/config.cmake, .thread-sanitizer-ignore | Updated environment and toolchain settings to support the new configurations. |
Comments suppressed due to low confidence (1)
core/application/impl/app_configuration_impl.cpp:833
- The help message for 'lucky-peers' still references '-1' for full broadcast despite using a uint32_t, which cannot represent negative values. Consider updating the message to reflect the valid input range or change the type if negative flags are required.
("lucky-peers", po::value<uint32_t>()->default_value(def_lucky_peers), "number of \"lucky\" peers (peers that are being gossiped to). -1 for full broadcast." )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Referenced issues
Description of the Change
collectGarbagekMaxPeers=1000forPeerManagerImpl::align()Possible Drawbacks