feat: add variants to ConnectionKind enum in floresta-wire#636
Closed
qlrd wants to merge 3 commits into
Closed
Conversation
Member
|
I think you should remove the |
daffd22 to
db806d8
Compare
091f3b6 to
60cc332
Compare
Davidson-Souza
requested changes
Sep 19, 2025
1971cd9 to
eeae205
Compare
eeae205 to
b352d21
Compare
Davidson-Souza
requested changes
Sep 29, 2025
341dd71 to
611b980
Compare
611b980 to
7373a2d
Compare
7373a2d to
8099e15
Compare
Member
|
Needs rebase |
JoseSK999
reviewed
Dec 26, 2025
Member
|
@qlrd are you still working on this? |
Contributor
Author
back :) |
8099e15 to
d860fc3
Compare
Member
|
@qlrd is this PR still a draft? |
2012b88 to
771e727
Compare
ConnectionKind enum in floresta-wireConnectionKind enum in floresta-wire
771e727 to
f127330
Compare
This commit add to the `ConnectionKind::Regular`, `ConnectionKind::Extra` and `ConnectionKind::Manual` variants 2 new subvariants `OutboundKind::OutboundFullRelay` and `OutboundKind::BlockRelayOnly`, as well add a `AddrFetch` to comply with Bitcoin-Core on the "connection_type" field of `getpeerinfo` rpc (we exclude here a `Inbound` type, this one do not make sense in Floresta).
…ion type. This commit checks if the `kind` connection from floresta's `getpeerinfo` rpc is compliant with the `connection_type` from bitcoind's `getpeerinfo` rpc. Also fix some spell checks in old unrelated files. Also was necessary to update `tests/floresta-cli/node-info.py` to correct connection type (regular -> manual).
f127330 to
8e679d2
Compare
Contributor
Author
Contributor
Author
Done |
Member
|
This PR should close #623 no? |
Contributor
Author
Yes |
Contributor
Author
Oh, forgot to mention it on commit message. Thanks @JoseSK999. |
This was referenced Mar 3, 2026
Davidson-Souza
added a commit
that referenced
this pull request
Mar 6, 2026
6de9fa1 feat(wire): make sure we don't ban Manual connections (Davidson Souza) 31c21a5 feat(wire): add a `Manual` variant to PeersKind (Davidson Souza) Pull request description: ### Description and Notes All peers that are added by the user — those added with the RPC `addnode` or the CLI option `--connect`, should have kind `Manual`, rather than `Regular`. This exempts them from: - Max peers quota — if we already have 10 peers and the user tries to addnode another one, we will now have 11 peers - They whitelisted and shouldn't be banned by misbehaving - They don't need to have any required service This commit adds this new variant, and makes sure we are following the above rules. This is a small subset of #636, and will be useful for getting #865 unstuck (potentially can help with some edge cases as mentioned in #852 (comment)) ACKs for top commit: jaoleal: ACK 6de9fa1 JoseSK999: re-ACK 6de9fa1 Tree-SHA512: 5d620318551ba4078fcc66d1f6af380e9875293f10e9c09e649f0f06f532c62df30b4415c3dd304eebd88039369eae96ec1f2e57ed7fb174fe7d042a5e6bf6f7
Member
|
Closing this since it's stale. Someone else can continue the work on another PR. |
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.
What is the purpose of this pull request?
Which crates are being modified?
Description and Notes
This PR is a partial fix of #622, in the sense to define enum variants compliant to the
"connection_type"field returned by the bitcoin-core'sgetpeerinforpc.How to verify the changes you have done?
It add to the
ConnectionKind::Regular,ConnectionKind::ExtraandConnectionKind::Manualvariants 2 new subvariantsOutboundKind::OutboundFullRelayandOutboundKind::BlockRelayOnly, as well add aAddrFetch(theInboundtype is excluded since this one do not make sense in Floresta).