p2p, refactor: remove unneeded CNetAddr::UnserializeV1Array()#22140
p2p, refactor: remove unneeded CNetAddr::UnserializeV1Array()#22140jonatack wants to merge 1 commit intobitcoin:masterfrom
Conversation
which is only called by CNetAddr::UnserializeV1Stream() and is a wrapper for CNetAddr::SetLegacyIPv6().
|
Concept ACK |
There was a problem hiding this comment.
ACK eaa6aae. Verified that UnserializeV1Stream that is not called anywhere else with rg -c UnserializeV1Array and built cleanly on macOs
|
I'm not convinced this is an improvement. Sure, it's a trivial function, but by having it this way there is symmetry with the V2 version of this function (I assume that was the reason for writing it this way). |
|
I would agree, but I don't see a V2 version of this function. |
|
There is a |
|
I think it's okay to get rid of this intermediate function. The signature Code review ACK eaa6aae |
|
The reasoning is to have pairs of ser/unser functions, e.g. We currently have There is no ser/unser for V2 to/from arrays because V2 length is variable. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
OK makes sense, let's close this then. I think API symmetry can be important but hadn't noticed it's an issue here. |
|
SGTM |
… and span.h with lifetimebound 33c6a20 span, doc: provide span.h context and explain lifetimebound definition (Jon Atack) d14395b net, doc: provide context for UnserializeV1Array() (Jon Atack) Pull request description: Add contextual documentation for developers and future readers of the code regarding - CNetAddr::UnserializeV1Array (see #22140) - Span and why it defines Clang lifetimebound locally rather than using the one in attributes.h ACKs for top commit: laanwj: Documentation review ACK 33c6a20 Tree-SHA512: cb8e6a6c23b36c9ef7499257e97c5378ec895bb9122b79b63b572d9721a1ae6ce6c0be7ad61bdf976c255527ae750fc9ff4b3e03c07c6c797d14dbc82ea9fb3a
…Array() and span.h with lifetimebound 33c6a20 span, doc: provide span.h context and explain lifetimebound definition (Jon Atack) d14395b net, doc: provide context for UnserializeV1Array() (Jon Atack) Pull request description: Add contextual documentation for developers and future readers of the code regarding - CNetAddr::UnserializeV1Array (see bitcoin#22140) - Span and why it defines Clang lifetimebound locally rather than using the one in attributes.h ACKs for top commit: laanwj: Documentation review ACK 33c6a20 Tree-SHA512: cb8e6a6c23b36c9ef7499257e97c5378ec895bb9122b79b63b572d9721a1ae6ce6c0be7ad61bdf976c255527ae750fc9ff4b3e03c07c6c797d14dbc82ea9fb3a
which is only called by
CNetAddr::UnserializeV1Stream()and is a wrapper forCNetAddr::SetLegacyIPv6().