-
Notifications
You must be signed in to change notification settings - Fork 38.7k
refactor: Serialization parameter cleanups #28473
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
-BEGIN VERIFY SCRIPT-
sed -i 's/WithParams(\(CAddress::V[12]_[A-Z]*\) *, */\1(/g' $(git grep -l 'WithParams' src/)
sed -i 's/WithParams(\(CNetAddr::V[12]\) *, */\1(/g' $(git grep -l 'WithParams' src/)
sed -i 's@\(CNetAddr::V1.CService{}.*\) //@\1 //@' src/test/util/net.cpp
-END VERIFY SCRIPT-
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. 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. |
|
I think the last commit is incomplete? For example, the following removal compiles fine for me locally on top of this pull and master: diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp
index 036355b5f1..37b670662f 100644
--- a/src/test/net_tests.cpp
+++ b/src/test/net_tests.cpp
@@ -331,7 +331,7 @@ BOOST_AUTO_TEST_CASE(cnetaddr_serialize_v1)
DataStream s{};
const auto ser_params{CAddress::V1_NETWORK};
- s << WithParams(ser_params, addr);
+ s << ser_params( addr);
BOOST_CHECK_EQUAL(HexStr(s), "00000000000000000000000000000000");
s.clear();
I think it may be good to try to nuke |
maflcko
left a comment
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.
lgtm ACK fb6a2ab 💨
Show signature
Signature:
untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
trusted comment: lgtm ACK fb6a2ab63e310d8b600352ef41aab6dafccfbff0 💨
ywac3bAMrnfFHQLulX4zEWpRkiedwedVsrfX38Q39iL2lYR4s+D+pEv/I+9r777WVdScxjp7uMSq+J08QgcZDg==
| }; | ||
| static constexpr bool ForRead() { return true; } | ||
|
|
||
| template<typename Stream, typename... Args> |
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 in bf147bf: Forgot to run clang-format? (Shouldn't cause any issues, because reviewers will have to use --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space either way)
I only changed the ones that had Not sure that's necessarily ideal, but that's what I was thinking, fwiw. |
|
Yeah, up to you. I personally don't see a risk in |
sedited
left a comment
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.
ACK fb6a2ab
I personally don't see a risk in s << ser_params(addr); and it is shorter and consistent with the s << V1(addr); stuff.
Also would have preferred s << ser_params(addr);.
Maybe add this to #28451 when rebasing it? |
@TheCharlatan You might want to review #28503 |
Cleanups after #25284: