-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Clean up RPC help messages (rebased) #3246
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
Based on the proposal, update the help message of rpc methods - strings arguments are in double quotes rather than square brackets - numeric arguments have no quotes (and no default value) - optional parameters are surrounded by round brackets - json arguments are strings but don't use double quotes Added 3 sections for the details - Arguments: lists each argument, it's type, required or not, a default, and a description - Result: The method result, with json format if applicable, type, and a description - Examples: examples calls using bitcoin-cli and curl for json rpc call Problems - maybe this is too verbose - lines might be too long - description are not good or complete - examples may be too much
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/a6099ef319a73e2255dca77065600abb22c4f5f8 for binaries and test log. |
Clean up RPC help messages (rebased)
…er been used. ac8a1d0 [RPC] Remove field in getblocktemplate help that has never been used (Conor Scott) Pull request description: [BIP 22 - getblocktemplate](https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki#Transactions%20Object%20Format) specifies an optional flag, `required` if the transaction must be in the block. Luke's implementation #936 did not include this flag, and it was later added to the help description in #3246 (more than a year later) but the field was still never actually implemented. As far as I can tell, bitcoin core would have never actually included this in a `getblocktemplate` call, so it seems logical to remove it from the help description. If I am missing something or this is considered harmless - I can close the PR. Tree-SHA512: f25dda51cc4e1512aff69309be04e3053bdccc1cf03c8d58e8866aa1fdf9d86cc57df872e85528351fc8a8d6d64a8f46a36c513680834762d854f368fbeb0f44
… txes (bitcoin#3246) * Move PS mixing entry verification on masternodes into `AddEntry()` Also streamline logic a bit and drop unused/excessive parts. * Unify PS checks among masternodes and clients * No need to re-check outputs over and over again * No need to count, fail early if any output is missing * No need to look any further once we found the input we expected A tx with duplicate inputs would be considered invalid anyway and we also know there are no duplicates because we just verified the final tx above. Also drop an unused variable. * Unify LogPrint-s * Drop human-readable strings for unused PoolMessage-s * Apply suggestions from code review Co-Authored-By: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com> * Re-introduce zero-fee checks * fix log * Move all txin/txout verification logic shared by CPrivateSendClientSession::SignFinalTransaction() and CPrivateSendServer::AddEntry() into CPrivateSendBaseSession::IsValidInOuts() * fix nit * Add missing return * Use CCoinsViewMemPool instead of doing it manually Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com> Co-authored-by: Alexander Block <ablock84@gmail.com>
… txes (bitcoin#3246) * Move PS mixing entry verification on masternodes into `AddEntry()` Also streamline logic a bit and drop unused/excessive parts. * Unify PS checks among masternodes and clients * No need to re-check outputs over and over again * No need to count, fail early if any output is missing * No need to look any further once we found the input we expected A tx with duplicate inputs would be considered invalid anyway and we also know there are no duplicates because we just verified the final tx above. Also drop an unused variable. * Unify LogPrint-s * Drop human-readable strings for unused PoolMessage-s * Apply suggestions from code review Co-Authored-By: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com> * Re-introduce zero-fee checks * fix log * Move all txin/txout verification logic shared by CPrivateSendClientSession::SignFinalTransaction() and CPrivateSendServer::AddEntry() into CPrivateSendBaseSession::IsValidInOuts() * fix nit * Add missing return * Use CCoinsViewMemPool instead of doing it manually Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com> Co-authored-by: Alexander Block <ablock84@gmail.com>
Rebased (and pulltester-fixed) version of #3184