-
Notifications
You must be signed in to change notification settings - Fork 37.7k
[net] Don't return an optional from TransportDeserializer::GetMessage() #22735
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
Conversation
This is #20364, rebased on master. Requesting rereview from @ryanofsky @MarcoFalke and @ajtowns, who reviewed the original PR. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
Also, access mapRecvBytesPerMsgCmd with `at()` not `find()`. This throws an error if COMMAND_OTHER doesn't exist, which should never happen. `find()` instead just accessed the last element, which could make debugging more difficult. Resolves review comments from PR19107: - bitcoin#19107 (comment) - bitcoin#19107 (comment)
0bf1ebf
to
f3e451b
Compare
Concept ACK |
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.
Concept ACK
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.
Code-review ACK f3e451b
Also rebased on master + verified that the build is clean and all tests pass.
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.
Code review ACK f3e451b. Changes since last review in #20364 (review) were simplifying by dropping the third commit, rebasing, and cleaning up some style & comments in the first commit.
The cleanups here are all small and straightforward, but I think the best one is getting rid of the unchecked map.find
iterator dereference, and getting rid of the redundant & sometimes initialized out_err_raw_size
output parameter.
Also, access mapRecvBytesPerMsgCmd with
at()
notfind()
. Thisthrows an error if COMMAND_OTHER doesn't exist, which should never
happen.
find()
instead just accessed the last element, which could makedebugging more difficult.
Resolves review comments from PR19107: