Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Mar 26, 2017

Fixes #10079.

Copy link
Contributor

@dcousens dcousens left a comment

Choose a reason for hiding this comment

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

ACK

@NicolasDorier
Copy link
Contributor

utACK

@laanwj
Copy link
Member

laanwj commented Mar 27, 2017

utACK fa55853. Makes sense. As this is an API change, this needs mention in the release notes.

@jonasschnelli
Copy link
Contributor

ACK fa55853

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Mar 27, 2017
@TheBlueMatt
Copy link
Contributor

Hmm, I suppose it's unlikely anyone is even using named args in 0.14 yet, so probably fine, but as folks start using this we should prefer to update docs over code.

utACK fa55853

@laanwj
Copy link
Member

laanwj commented Mar 29, 2017

Hmm, I suppose it's unlikely anyone is even using named args in 0.14 yet, so probably fine, but as folks start using this we should prefer to update docs over code.

In general you are right, but in this specific case 'inputs' is a much better name for the argument. I think this slipped by in review of #8811.

@laanwj laanwj merged commit fa55853 into bitcoin:master Mar 29, 2017
laanwj added a commit that referenced this pull request Mar 29, 2017
fa55853 rpc: Rename first named arg of createrawtransaction (MarcoFalke)

Tree-SHA512: f2e07183f2503344e676e08fe0fd73e995d7c6fda3fc11c64116208dec8e445f0627583dfba85014129b6f2dc7e253b9d760e57e66811272db89e9ba25ce6dbc
@maflcko maflcko deleted the Mf1703-createRawName branch March 29, 2017 09:02
codablock pushed a commit to codablock/dash that referenced this pull request Jan 26, 2018
fa55853 rpc: Rename first named arg of createrawtransaction (MarcoFalke)

Tree-SHA512: f2e07183f2503344e676e08fe0fd73e995d7c6fda3fc11c64116208dec8e445f0627583dfba85014129b6f2dc7e253b9d760e57e66811272db89e9ba25ce6dbc
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
fa55853 rpc: Rename first named arg of createrawtransaction (MarcoFalke)

Tree-SHA512: f2e07183f2503344e676e08fe0fd73e995d7c6fda3fc11c64116208dec8e445f0627583dfba85014129b6f2dc7e253b9d760e57e66811272db89e9ba25ce6dbc
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 27, 2019
fa55853 rpc: Rename first named arg of createrawtransaction (MarcoFalke)

Tree-SHA512: f2e07183f2503344e676e08fe0fd73e995d7c6fda3fc11c64116208dec8e445f0627583dfba85014129b6f2dc7e253b9d760e57e66811272db89e9ba25ce6dbc
furszy added a commit to PIVX-Project/PIVX that referenced this pull request Jun 2, 2021
9ed1bdd [RPC] Remove obsolete and ignored 'detach' argument of stop command (random-zebra)
7d9af29 [Doc] Add RPC named arguments to release notes (random-zebra)
1582bdf [QA] Add rpc_named_arguments.py functional test (random-zebra)
d87da93 rpc: Rename first named arg of createrawtransaction (random-zebra)
7ae8964 [Refactor] Sort RPC command tables alphabetically (random-zebra)
da63bb8 rpc: Named argument support for pivx-cli (random-zebra)
22ee72a rpc: Named arguments for rawtransaction calls (Wladimir J. van der Laan)
3a93690 rpc: Named arguments for wallet calls (random-zebra)
f137eca rpc: Named arguments for mining calls (Wladimir J. van der Laan)
d524cc1 RPC: Named arguments for masternode, budget, and evo calls (random-zebra)
81de632 rpc: Named arguments for net calls (Wladimir J. van der Laan)
8e5bed7 rpc: Named arguments for misc calls (random-zebra)
4b2b980 rpc: Add 'echo' call for testing (Wladimir J. van der Laan)
f8617c2 rpc: Named arguments for blockchain calls (random-zebra)
a00e323 rpc: Support named arguments (Wladimir J. van der Laan)
a0da903 authproxy: Add support for RPC named arguments (Wladimir J. van der Laan)

Pull request description:

  The [JSON-RPC specification](http://www.jsonrpc.org/specification) allows either passing parameters as an Array, for positional arguments, or as an Object, for named arguments. Currently PIVX Core only supports positional arguments.

  This pull request adds support for named arguments, but preserves full backwards compatibility. APIs using by-name arguments are easier to extend - as arguments can be left out - and easier to use - no need to guess which argument goes where.

  This is especially nice in languages such as Python, which have native support for named arguments. Examples from the test:
  ```python
  h = node.help(command='getinfo')
  h = node.getblockhash(height=0)
  h = node.getblock(hash=h)
  ```

  Backported from:
  - bitcoin#8811 : Add support for JSON-RPC named arguments _[W. J. van der Laan]_
  - bitcoin#10084 : Rename first named arg of createrawtransaction _[MarcoFalke]_

ACKs for top commit:
  furszy:
    cool feature, ACK 9ed1bdd
  Fuzzbawls:
    ACK 9ed1bdd

Tree-SHA512: 03001e5d1525e30af2126ebbabda275256df3dda170dbaf5732547af50dff90d655db78312666017840959704f6e0f268f99d91542e3a5f15484f1417a7bc904
@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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rpc] Createrawtransaction doc does not match named args

6 participants