HomePhabricator

Fix signrawtransaction failing when a wallet URI is specified

Description

Fix signrawtransaction failing when a wallet URI is specified

Summary:
The issue has been raised by @florian.

Since D2007, the signrawtransaction RPC is routing the call to two new
RPCs, signrawtransactionwithkey and signrawtransactionwithwallet.
The routing is achieved by creating a copy of the JSON request and
forwading it to the new method.

The request URI is not copied during the process, which introduces a
regression when a node which uses multiple wallets calls
signrawtransaction: the request returns an error because the wallet is
not specified.

This diff forwards the URI to the signrawtransactionwith* RPCs and
adds a test case to check the behavior.

Test Plan:

./test/functional/test_runner.py rpc_signrawtransaction

Reviewers: florian, #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: florian, #bitcoin_abc, jasonbcox

Subscribers: schancel, florian

Differential Revision: https://reviews.bitcoinabc.org/D2771

Details

Provenance
FabienAuthored on Apr 3 2019, 21:21
FabienPushed on Apr 8 2019, 07:24
Reviewer
Restricted Project
Differential Revision
D2771: Fix signrawtransaction failing when a wallet URI is specified
Parents
rABC646b7a6ae44d: [CI] Add an option to build and run unit tests with debug enabled
Branches
Unknown
Tags
Unknown