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

RPC: Fix currency unit string in the help text #11173

Merged
merged 1 commit into from Sep 5, 2017

Conversation

AkioNak
Copy link
Contributor

@AkioNak AkioNak commented Aug 28, 2017

  1. The RPC help text should use the constant CURRENCY_UNIT defined in policy/feerate.cpp instead of the literal 'BTC'.
    In the following 2 RPC commands, 'BTC' is written directly in the help text.
    This commit changes them to use that constant.

    1. estimatesmartfee
    2. estimaterawfee
  2. Some RPC command use 'satoshis' as the unit.
    It should be written as 'satoshis' instead of 'Satoshis' in the RPC help text.
    So, this commit fixes this typo in getblocktemplate.

@meshcollider
Copy link
Contributor

utACK 54cd27b

@laanwj laanwj added the Docs label Aug 28, 2017
@instagibbs
Copy link
Member

utACK 54cd27b

@maflcko
Copy link
Member

maflcko commented Aug 31, 2017

utACK 54cd27b

@jnewbery
Copy link
Contributor

jnewbery commented Sep 1, 2017

For both feerate help strings, I think the following text is more precise:

"(numeric, optional) estimated fee rate (in " + CURRENCY_UNIT + "-per-kilobyte)\n"

@AkioNak
Copy link
Contributor Author

AkioNak commented Sep 2, 2017

@jnewbery Thank you for your comment.
In other RPCs, there are 2 patterns for the notation of fee rate unit like this case:

  1. ... in " + CURRENCY_UNIT + "/kB" ... (In most cases)
  2. ... (" + CURRENCY_UNIT + " per KB)" ...
    (getmempoolinfo - mempoolminfee, fundrawtransaction - feeRate)

So I think case 1. is better than using -per-kilobyte for these help strings of this PR.
And case 2, I think it is better to modify per KB to /kB because KB implies KiB or Kibibyte (2^10 byte) and they just display the unit.

@AkioNak AkioNak force-pushed the use_currency_unit_constant branch 2 times, most recently from 7bdbb93 to 7c42288 Compare September 4, 2017 09:33
@AkioNak
Copy link
Contributor Author

AkioNak commented Sep 4, 2017

@jnewbery I fixed the feerate help strings.

@meshcollider
Copy link
Contributor

meshcollider commented Sep 4, 2017

/kB is better than -per-kilobyte imo but I prefer @jnewbery's string with the brackets overall with that small adjustment.

Also please squash commits into 1

@jnewbery
Copy link
Contributor

jnewbery commented Sep 4, 2017

New help strings look good to me. Please squash commits and I'll re-review.

1. The RPC help text should use the constant CURRENCY_UNIT defined in
  policy/feerate.cpp instead of the literal 'BTC'. In the following
  2 RPC commands, 'BTC' is written directly in the help text.
    1) estimatesmartfee
    2) estimaterawfee
  And also, for these help strings, the notation
  'fee-per-kilobyte (in BTC)' is somewhat ambiguous.

  To write more precisely, this commit changes to 'fee rate in BTC/kB'
  with using the constant CURRENCY_UNIT.

2. Some RPC command use 'satoshis' as the unit. It should be written
  as 'satoshis' instead of 'Satoshis' in the RPC help text.

  So, this commit fixes this typo in getblocktemplate.

3. The phrase that '... feerate (BTC per KB) ...'  is used to explain
  the fee rate in the help text of following 2 RPC commands.
    1) getmempoolinfo
    2) fundrawtransaction
  But they are different from other similar help text of the RPCs.
  And also, 'KB' implies Kibibyte (2^10 byte).

  To unify and to clarify, this commit changes these phrase to
  '... fee rate in BTC/kB ...'.
  (BTC references the constant 'CURRENCY_UNIT')
@AkioNak
Copy link
Contributor Author

AkioNak commented Sep 5, 2017

@jnewbery @meshcollider I squashed the commits.

@meshcollider
Copy link
Contributor

re-utACK 47ba2c3

@jnewbery
Copy link
Contributor

jnewbery commented Sep 5, 2017

Tested ACK 47ba2c3

@maflcko
Copy link
Member

maflcko commented Sep 5, 2017

re-utACK 47ba2c3

@maflcko maflcko merged commit 47ba2c3 into bitcoin:master Sep 5, 2017
maflcko pushed a commit that referenced this pull request Sep 5, 2017
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
@AkioNak AkioNak deleted the use_currency_unit_constant branch October 10, 2017 01:03
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 20, 2019
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 23, 2019
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 24, 2019
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 22, 2019
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 2, 2020
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 4, 2020
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 4, 2020
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 10, 2020
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 10, 2020
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 10, 2020
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 12, 2020
47ba2c3 Fix currency/fee-rate unit string in the help text (Akio Nakamura)

Pull request description:

  1. The RPC help text should use the constant `CURRENCY_UNIT` defined in `policy/feerate.cpp` instead of the literal `'BTC'`.
    In the following 2 RPC commands, `'BTC'` is written directly in the help text.
    This commit changes them to use that constant.
       1) `estimatesmartfee`
       2) `estimaterawfee`

  2. Some RPC command use `'satoshis'` as the unit.
    It should be written as `'satoshis'` instead of `'Satoshis'` in the RPC help text.
    So, this commit fixes this typo in `getblocktemplate`.

Tree-SHA512: d0bd1cd90560e59bf456b076b958a2a1c998f85a7e65aeb6b2abcaba18919a3ae62f7c3909210461084c1a3275a35b6ba3ea3ec8f5cce33702ffe383c9e84bce
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants