rpc: Assert named arguments are unique in RPCHelpMan #14885
pull promag wants to merge 1 commits into bitcoin:master from promag:2018-12-assert-unique-args changing 2 files +11 −4-
promag commented at 3:43 pm on December 6, 2018: memberPrevents an obvious mistake.
-
DrahtBot commented at 3:54 pm on December 6, 2018: member
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #14875 (RPCHelpMan: Support required arguments after optional ones by MarcoFalke)
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.
-
in src/rpc/util.cpp:254 in 99e68dc742 outdated
248@@ -249,7 +249,9 @@ std::string RPCHelpMan::ToString() const 249 // Oneline summary 250 ret += m_name; 251 bool is_optional{false}; 252+ std::set<std::string> args; 253 for (const auto& arg : m_args) { 254+ assert(args.insert(arg.m_name).second);
MarcoFalke commented at 4:27 pm on December 6, 2018:I guess with “arguments” you mean “named arguments”? Could clarify that in the commit title and put a comment here or name the set appropriately.
promag commented at 5:10 pm on December 6, 2018:Sure, will do.promag renamed this:
rpc: Assert arguments are unique in RPCHelpMan
rpc: Assert named arguments are unique in RPCHelpMan
on Dec 6, 2018promag force-pushed on Dec 6, 2018fanquake added the label RPC/REST/ZMQ on Dec 6, 2018Empact commented at 9:39 pm on December 6, 2018: membernit: might be a bit better to have this validation in the constructor, from a separation of concerns perspective.rpc: Assert named arguments are unique in RPCHelpMan e09a5875capromag force-pushed on Dec 7, 2018Empact commented at 6:51 pm on December 9, 2018: memberutACK e09a5875cac3e691bb9cc8301cb882d63b029cb0MarcoFalke commented at 7:43 pm on December 9, 2018: memberutACK e09a587MarcoFalke referenced this in commit 234b99b921 on Dec 10, 2018MarcoFalke merged this on Dec 10, 2018MarcoFalke closed this on Dec 10, 2018
deadalnix referenced this in commit 43d44b2e89 on Apr 20, 2020DrahtBot locked this on Sep 8, 2021
promag DrahtBot MarcoFalke EmpactLabels
RPC/REST/ZMQ
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-18 12:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-18 12:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me