diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-05-10 08:43:59 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-05-10 08:44:02 +0200 |
commit | 2a22d903f3da54b31d21e74c3e084f5113f13789 (patch) | |
tree | 4b1ead20ca2033af1c96804776c9834420f301e1 /test | |
parent | 3028a1e3848e61ad4361450d3c86417c5ef0423c (diff) | |
parent | 7031721f2cc3eef30c46ff50c52328e9ba8090e0 (diff) |
Merge bitcoin/bitcoin#21897: rpc: adjust incorrect RPCHelpMan types
7031721f2cc3eef30c46ff50c52328e9ba8090e0 rpc/listaddressgroupings: redefine inner-most array as ARR_FIXED (Karl-Johan Alm)
8500f7bf54d3e27fd2fa7fda15ad833f5688c331 rpc/createrawtransaction: redefine addresses as OBJ_USER_KEYS (Karl-Johan Alm)
d9e2183c50f50465b9f173171fee240949bf8bd2 rpc: include OBJ_USER_KEY in RPCArg constructor checks (Karl-Johan Alm)
Pull request description:
This PR adjusts the two issues I encountered while developing a tool that converts RPCHelpMan objects into bindings for other language(s).
The first is in createrawtransaction, where the address part, e.g. bc1qabc in
> createrawtransaction '[]' '[{"bc1qabc": 1.0}]'
is declared as a `Type::OBJ`, when in reality it should be a `Type::OBJ_USER_KEYS`, defined as such:
https://github.com/bitcoin/bitcoin/blob/5925f1e652768a9502831b9ccf78d16cf3c37d29/src/rpc/util.h#L126
(coincidentally, this is the first and only (afaict) usage of this `RPCArg::Type`).
The second is in the `listaddressgroupings` RPC, which returns an array of arrays of arrays, where the innermost one is a tuple-thingie with an optional 3rd item; this is an `ARR_FIXED`, not an `ARR`.
ACKs for top commit:
MarcoFalke:
ACK 7031721f2cc3eef30c46ff50c52328e9ba8090e0 🐀
Tree-SHA512: 769377416c6226d1738a956fb685498e009f9e7eb2d45bc679b81c5364b9520fdbcb49392c937ab45598aa0d33589e8e6a59ccc101cf8d8e7dfdafd58d4eefd0
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions