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

Replace async sc_peerset::PeersetHandle interface with a shared struct #529

Closed
dmitry-markin opened this issue Jul 27, 2022 · 1 comment
Closed
Assignees
Labels
I4-refactor Code needs refactoring.

Comments

@dmitry-markin
Copy link
Contributor

Currently PeersetHandle allows sending only async updates to Peerset, but not getting the information back. As discussed in paritytech/substrate#11909 (comment), there is no reason for PeersetHandle to be an async interface.

Making Peerset/PeersetHandle a synchronous struct shared with Arc will make it possible to access sets from other parts of the code. Specifically, this will make it possible to track reserved peers added via RPC calls and make them not occupy peer slots in sc_network::Protocol.

@altonen
Copy link
Contributor

altonen commented Aug 29, 2023

Not relevant anymore

@altonen altonen closed this as completed Aug 29, 2023
@github-project-automation github-project-automation bot moved this from In Progress 🛠 to Blocked ⛔️ in Networking Aug 29, 2023
@altonen altonen moved this from Blocked ⛔️ to Done ✅ in Networking Aug 29, 2023
claravanstaden pushed a commit to Snowfork/polkadot-sdk that referenced this issue Dec 8, 2023
)

* added bounded vec

* removed empty expects calls

* added tests for import header

* renamed variables

* get max headers from config

* fixed checks

* applied some refactorings

* replaced custom insert/update code with try_append

* removed dependency on bounded slice

* removed map

* made import headers transactional

* remvoed whitespace
helin6 pushed a commit to boolnetwork/polkadot-sdk that referenced this issue Feb 5, 2024
* Fix transaction hashing

* Add receipt check in ts-tests
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
bkchr pushed a commit that referenced this issue Apr 10, 2024
* generic SyncHeader type

* add panic condition to method description

* extract -> into_inner

* checked_sub + expect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I4-refactor Code needs refactoring.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants