Skip to content
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

doc: Normalize RPC description whitespace #23714

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Dec 8, 2021

It is tedious to manually add trailing newlines after the description so that there is an empty new line before the Arguments section.

Fix that by adding it with C++ code.

@maflcko
Copy link
Member Author

maflcko commented Dec 8, 2021

Rendered diff:
diff --git a/combinerawtransaction b/combinerawtransaction
index 0163a0e..4b35ba7 100644
--- a/combinerawtransaction
+++ b/combinerawtransaction
@@ -3,6 +3,7 @@ combinerawtransaction ["hexstring",...]
 Combine multiple partially signed transactions into one transaction.
 The combined transaction may be another partially signed transaction or a 
 fully signed transaction.
+
 Arguments:
 1. txs                 (json array, required) The hex strings of partially signed transactions
      [
diff --git a/echo b/echo
index a2b5876..58d7d21 100644
--- a/echo
+++ b/echo
@@ -5,6 +5,7 @@ Simply echo back the input arguments. This command is for testing.
 It will return an internal bug report when arg9='trigger_internal_bug' is passed.
 
 The difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in bitcoin-cli and the GUI. There is no server-side difference.
+
 Arguments:
 1. arg0     (string, optional)
 2. arg1     (string, optional)
diff --git a/echojson b/echojson
index 727e330..15a45f8 100644
--- a/echojson
+++ b/echojson
@@ -5,6 +5,7 @@ Simply echo back the input arguments. This command is for testing.
 It will return an internal bug report when arg9='trigger_internal_bug' is passed.
 
 The difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in bitcoin-cli and the GUI. There is no server-side difference.
+
 Arguments:
 1. arg0     (string, optional)
 2. arg1     (string, optional)
diff --git a/enumeratesigners b/enumeratesigners
index 7e5a88a..f5f7123 100644
--- a/enumeratesigners
+++ b/enumeratesigners
@@ -1,5 +1,7 @@
 enumeratesigners
+
 Returns a list of external signers from -signer.
+
 Result:
 {                               (json object)
   "signers" : [                 (json array)
diff --git a/finalizepsbt b/finalizepsbt
index edb01e1..6353f9f 100644
--- a/finalizepsbt
+++ b/finalizepsbt
@@ -1,4 +1,5 @@
 finalizepsbt "psbt" ( extract )
+
 Finalize the inputs of a PSBT. If the transaction is fully signed, it will produce a
 network serialized transaction which can be broadcast with sendrawtransaction. Otherwise a PSBT will be
 created which has the final_scriptSig and final_scriptWitness fields filled for inputs that are complete.
diff --git a/generate b/generate
index 27888c4..958216f 100644
--- a/generate
+++ b/generate
@@ -1,2 +1,3 @@
 generate
-has been replaced by the -generate cli option. Refer to -help for more information.
\ No newline at end of file
+
+has been replaced by the -generate cli option. Refer to -help for more information.
diff --git a/getbalances b/getbalances
index 641dc36..5b9ed28 100644
--- a/getbalances
+++ b/getbalances
@@ -1,4 +1,5 @@
 getbalances
+
 Returns an object with all balances in BTC.
 
 Result:
diff --git a/getblockchaininfo b/getblockchaininfo
index e2c2432..8e54224 100644
--- a/getblockchaininfo
+++ b/getblockchaininfo
@@ -1,4 +1,5 @@
 getblockchaininfo
+
 Returns an object containing various state info regarding blockchain processing.
 
 Result:
diff --git a/getchaintips b/getchaintips
index 2c60fb8..a1ed624 100644
--- a/getchaintips
+++ b/getchaintips
@@ -1,4 +1,5 @@
 getchaintips
+
 Return information about all known tips in the block tree, including the main chain as well as orphaned branches.
 
 Result:
diff --git a/getmemoryinfo b/getmemoryinfo
index 4714343..f8a4ab1 100644
--- a/getmemoryinfo
+++ b/getmemoryinfo
@@ -1,4 +1,5 @@
 getmemoryinfo ( "mode" )
+
 Returns an object containing information about memory usage.
 
 Arguments:
diff --git a/getmininginfo b/getmininginfo
index 211e86a..de830eb 100644
--- a/getmininginfo
+++ b/getmininginfo
@@ -1,6 +1,7 @@
 getmininginfo
 
 Returns a json object containing mining-related information.
+
 Result:
 {                              (json object)
   "blocks" : n,                (numeric) The current block
diff --git a/getnetworkinfo b/getnetworkinfo
index 6412c29..7caa9b8 100644
--- a/getnetworkinfo
+++ b/getnetworkinfo
@@ -1,4 +1,5 @@
 getnetworkinfo
+
 Returns an object containing various state info regarding P2P networking.
 
 Result:
diff --git a/getunconfirmedbalance b/getunconfirmedbalance
index feddf99..1a35fe9 100644
--- a/getunconfirmedbalance
+++ b/getunconfirmedbalance
@@ -1,4 +1,5 @@
 getunconfirmedbalance
+
 DEPRECATED
 Identical to getbalances().mine.untrusted_pending
 
diff --git a/getwalletinfo b/getwalletinfo
index 43cb494..4242432 100644
--- a/getwalletinfo
+++ b/getwalletinfo
@@ -1,4 +1,5 @@
 getwalletinfo
+
 Returns an object containing various wallet state info.
 
 Result:
diff --git a/listwalletdir b/listwalletdir
index fc94638..38f3870 100644
--- a/listwalletdir
+++ b/listwalletdir
@@ -1,4 +1,5 @@
 listwalletdir
+
 Returns a list of wallets in the wallet directory.
 
 Result:
diff --git a/listwallets b/listwallets
index b4d5226..c53bb40 100644
--- a/listwallets
+++ b/listwallets
@@ -1,4 +1,5 @@
 listwallets
+
 Returns a list of currently loaded wallets.
 For full information on the wallet, use "getwalletinfo"
 
diff --git a/logging b/logging
index 82ddc99..ab3f392 100644
--- a/logging
+++ b/logging
@@ -1,4 +1,5 @@
 logging ( ["include_category",...] ["exclude_category",...] )
+
 Gets and sets the logging configuration.
 When called without an argument, returns the list of categories with status that are currently being debug logged or not.
 When called with arguments, adds or removes categories from debug logging and return the lists above.
diff --git a/prioritisetransaction b/prioritisetransaction
index ee97b39..7bc1eea 100644
--- a/prioritisetransaction
+++ b/prioritisetransaction
@@ -1,4 +1,5 @@
 prioritisetransaction "txid" ( dummy ) fee_delta
+
 Accepts the transaction into mined blocks at a higher (or lower) priority
 
 Arguments:
diff --git a/pruneblockchain b/pruneblockchain
index e9d525c..9445cbc 100644
--- a/pruneblockchain
+++ b/pruneblockchain
@@ -1,5 +1,7 @@
 pruneblockchain height
 
+
+
 Arguments:
 1. height    (numeric, required) The block height to prune up to. May be set to a discrete height, or to a UNIX epoch time
              to prune blocks whose block time is at least 2 hours older than the provided timestamp.
diff --git a/stop b/stop
index 655ab93..f7f3c6e 100644
--- a/stop
+++ b/stop
@@ -1,5 +1,6 @@
 stop
 
 Request a graceful shutdown of Bitcoin Core.
+
 Result:
 "str"    (string) A string with the content 'Bitcoin Core stopping'
diff --git a/unloadwallet b/unloadwallet
index 7b0c262..8c5a266 100644
--- a/unloadwallet
+++ b/unloadwallet
@@ -1,6 +1,8 @@
 unloadwallet ( "wallet_name" load_on_startup )
+
 Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument.
 Specifying the wallet name on a wallet endpoint is invalid.
+
 Arguments:
 1. wallet_name        (string, optional, default=the wallet name from the RPC endpoint) The name of the wallet to unload. If provided both here and in the RPC endpoint, the two must be identical.
 2. load_on_startup    (boolean, optional) Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged.
diff --git a/upgradewallet b/upgradewallet
index d5c3380..d7ea788 100644
--- a/upgradewallet
+++ b/upgradewallet
@@ -2,6 +2,7 @@ upgradewallet ( version )
 
 Upgrade the wallet. Upgrades to the latest version if no version number is specified.
 New keys may be generated and a new wallet backup will need to be made.
+
 Arguments:
 1. version    (numeric, optional, default=169900) The version number to upgrade to. Default is the latest wallet version.
 
diff --git a/verifymessage b/verifymessage
index ac5019b..b5c1c12 100644
--- a/verifymessage
+++ b/verifymessage
@@ -1,6 +1,6 @@
 verifymessage "address" "signature" "message"
 
-Verify a signed message
+Verify a signed message.
 
 Arguments:
 1. address      (string, required) The bitcoin address to use for the signature.
diff --git a/walletdisplayaddress b/walletdisplayaddress
index 7d8de0e..4188cfb 100644
--- a/walletdisplayaddress
+++ b/walletdisplayaddress
@@ -1,5 +1,7 @@
 walletdisplayaddress "address"
+
 Display address on an external signer for verification.
+
 Arguments:
 1. address    (string, required) bitcoin address to display
 

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

ACK faa0833

@fanquake fanquake merged commit c4ae714 into bitcoin:master Dec 9, 2021
@maflcko maflcko deleted the 2112-docRPCWhitespace branch December 9, 2021 08:21
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 10, 2021
faa0833 doc: Normalize RPC description whitespace (MarcoFalke)

Pull request description:

  It is tedious to manually add trailing newlines after the description so that there is an empty new line before the `Arguments` section.

  Fix that by adding it with C++ code.

ACKs for top commit:
  fanquake:
    ACK faa0833

Tree-SHA512: 061786c7f19d767f2b7a0362b948e34d181f4cc740a60211756da29ece7554e95be39a9beec3e201eddc8da3ea7e22ac917479eae04b230bb7b0db7a9647af8c
RandyMcMillan pushed a commit to RandyMcMillan/mempool-tab that referenced this pull request Dec 23, 2021
a8395b5 doc: Normalize RPC description whitespace (MarcoFalke)

Pull request description:

  It is tedious to manually add trailing newlines after the description so that there is an empty new line before the `Arguments` section.

  Fix that by adding it with C++ code.

ACKs for top commit:
  fanquake:
    ACK a8395b5

Tree-SHA512: 061786c7f19d767f2b7a0362b948e34d181f4cc740a60211756da29ece7554e95be39a9beec3e201eddc8da3ea7e22ac917479eae04b230bb7b0db7a9647af8c
@bitcoin bitcoin locked and limited conversation to collaborators Dec 9, 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.

3 participants