-
Notifications
You must be signed in to change notification settings - Fork 84
feat!: add variants to ConnectionKind enum in floresta-wire
#636
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
base: master
Are you sure you want to change the base?
Conversation
|
I think you should remove the |
daffd22 to
db806d8
Compare
091f3b6 to
60cc332
Compare
1971cd9 to
eeae205
Compare
eeae205 to
b352d21
Compare
341dd71 to
611b980
Compare
611b980 to
7373a2d
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). chore: remove `std::fmt::write` from `floresta-wire/src/p2p_wire/error.rs`
…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.
7373a2d to
8099e15
Compare
| def block_header(self, block_hash: str): | ||
| """ | ||
| Return a block header, given its hash. | ||
| Return the hash of a block, given it's hash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description seems a bit confusing. If the function receives a block hash and simply returns the same hash, the purpose is not very clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It not returns the same hash, it returns the header given its hash. Maybe without , and with the word blockheader?
| Return the hash of a block, given it's hash. | |
| Return a blockheader given its hash. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks better
| Return the hash of a block, given it's hash. | |
| Return the block header for the given block hash. |
|
Needs rebase |
| /// | ||
| /// We automatically attempt to open [NodeContext::MAX_FULL_RELAY_PEERS] | ||
| /// using addresses from our [AddressMan]. | ||
| OutboundFullRelay(ServiceFlags), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can you move this one to be below Feeler (and above BlockRelayOnly)
|
@qlrd are you still working on this? |
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).