-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: [refactor] Use reference over ptr to chainman #33840
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1301,7 +1301,7 @@ class V2TransportTester | |||||||||
| { | ||||||||||
| // Construct contents consisting of 0x00 + 12-byte message type + payload. | ||||||||||
| std::vector<uint8_t> contents(1 + CMessageHeader::MESSAGE_TYPE_SIZE + payload.size()); | ||||||||||
| std::copy(mtype.begin(), mtype.end(), reinterpret_cast<char*>(contents.data() + 1)); | ||||||||||
| std::copy(mtype.begin(), mtype.end(), contents.begin() + 1); | ||||||||||
| std::copy(payload.begin(), payload.end(), contents.begin() + 1 + CMessageHeader::MESSAGE_TYPE_SIZE); | ||||||||||
|
Comment on lines
+1304
to
1305
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To clarify that the second one doesn't actually copy where the first left off:
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The goal is to just change the line, so that it matches all other test cases in this file. Happy to review a follow-up to apply the clang-tidy use-ranges to the |
||||||||||
| // Send a packet with that as contents. | ||||||||||
| SendPacket(contents); | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
We could mention that the fixed-size type is right-padded with zeros:
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 that is clear from reading the code, so will leave as-is for now. No opinion about
string_view. Will leave as-is for now, to not invalidate the two reviews.