diff options
author | fanquake <fanquake@gmail.com> | 2019-09-07 08:21:28 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2019-09-07 08:39:56 +0800 |
commit | 46494b08e2393985facca362a525a598bf54495a (patch) | |
tree | 587b6d50fe2a0f20c56a783be9f1dcca230b67b6 /src/wallet/rpcwallet.cpp | |
parent | ae3e3bd151f43dfa9e08bf592aafc6066bad258d (diff) | |
parent | 39034f1ee628dae0bc9da5b1b30b8a424e66d968 (diff) |
Merge #16798: Refactor rawtransaction_util's SignTransaction to separate prevtx parsing
39034f1ee628dae0bc9da5b1b30b8a424e66d968 Refactor rawtransaction_util's SignTransaction to have previous tx parsing be separate (Andrew Chow)
Pull request description:
Currently the `SignTransaction` function has to handle both the actual signing and parsing of previous transaction data. This PR splits it so that `SignTransaction` only handles the signing itself and adds a `ParsePrevouts` function which handles parsing the prevtx information.
This allows for `SignTransaction` to just take any `SigningProvider`.
Split from #16341
ACKs for top commit:
MarcoFalke:
ACK 39034f1ee628dae0bc9da5b1b30b8a424e66d968
instagibbs:
utACK https://github.com/bitcoin/bitcoin/pull/16798/commits/39034f1ee628dae0bc9da5b1b30b8a424e66d968
ryanofsky:
utACK 39034f1ee628dae0bc9da5b1b30b8a424e66d968. No change since previously reviewed b49bbb939be92a67ff77c3f7bca5bb94dd141906, https://github.com/bitcoin/bitcoin/pull/16341#pullrequestreview-278610269 other than rebase with no conflicts.
Tree-SHA512: 09f7733e90691766bfb5cf0f20e913dbf270bd3b51abdcad966b24d110e562ed85fd3d0d1d7bbea61f903340060052ec73c4817b09aee0dc1f3916d781a9e40c
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 22a5f7e249..b88aabd0fa 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3280,7 +3280,10 @@ UniValue signrawtransactionwithwallet(const JSONRPCRequest& request) } pwallet->chain().findCoins(coins); - return SignTransaction(mtx, request.params[1], pwallet, coins, false, request.params[2]); + // Parse the prevtxs array + ParsePrevouts(request.params[1], nullptr, coins); + + return SignTransaction(mtx, pwallet, coins, request.params[2]); } static UniValue bumpfee(const JSONRPCRequest& request) |