Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Apr 6, 2020

This fixes several issues:

  • The documentation is not compile-time static and depends on run-time arguments, making it impossible to host it on a static resource like a website or pdf. See also a similar change in the wallet rpc code: rpc: Make rpc documentation not depend on call-time rpc args #18499
  • The same call (relying on default values) will run different code on different machines, depending on the command line args that were used to start the server. This might lead to hard-to-debug-remote issues.

This is a small behaviour change, and I will add release notes.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 7, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, 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.

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

}.Check(request);

LOCK(cs_main);
const int check_level(request.params[0].isNull() ? DEFAULT_CHECKLEVEL : request.params[0].get_int());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should also use list initialization here ({....}), same as one line below

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That wouldn't compile

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, DEFAULT_CHECKLEVEL has the wrong type -- unsigned even If the consuming function takes it as signed (for whatever reason).

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fad691c

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK fad691c.

@maflcko maflcko merged commit a840dab into bitcoin:master Apr 10, 2020
@maflcko maflcko deleted the 2004-rpcStaticDefaults branch April 10, 2020 15:24
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 13, 2020
… depend on global args

fad691c rpc: Make verifychain default values static, not depend on global args (MarcoFalke)

Pull request description:

  This fixes several issues:

  * The documentation is not compile-time static and depends on run-time arguments, making it impossible to host it on a static resource like a website or pdf. See also a similar change in the wallet rpc code: bitcoin#18499
  * The same call (relying on default values) will run different code on different machines, depending on the command line args that were used to start the server. This might lead to hard-to-debug-remote issues.

  This is a small behaviour change, and I will add release notes.

ACKs for top commit:
  theStack:
    ACK bitcoin@fad691c
  promag:
    Code review ACK fad691c.

Tree-SHA512: 1c7a253ff0ec13a973b10d3777b71c70954ded5805b65a3ab06317327014de4cd0601d71d30c6ce89a581722c150cb5567acc1bd3e0c789cb51bab6ef0dcfc4a
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 14, 2021
Summary:
> This fixes several issues:
>
> - The documentation is not compile-time static and depends on run-time arguments, making it impossible to host it on a static resource like a website or pdf. See also a similar change in the wallet rpc code: #18499
> - The same call (relying on default values) will run different code on different machines, depending on the command line args that were used to start the server. This might lead to hard-to-debug-remote issues.

This is a backport of Core [[bitcoin/bitcoin#18541 | PR18541]]

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D8911
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants