aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorGlenn Willen <gwillen@nerdnet.org>2018-10-26 15:26:16 -0700
committerGlenn Willen <gwillen@nerdnet.org>2018-11-01 12:11:24 -0700
commit65166d4cf828909dc4bc49dd68a58103d015f1fd (patch)
treec72e82590f9a56617085336e41010b74d25586dd /src/wallet/rpcwallet.cpp
parent4f3f5cb4b142f0fcb36241fa33b52a257901dbee (diff)
downloadbitcoin-65166d4cf828909dc4bc49dd68a58103d015f1fd.tar.xz
New PartiallySignedTransaction constructor from CTransction
New constructor that creates a PartiallySignedTransaction from a CTransaction, automatically sizing the inputs and outputs vectors for convenience.
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index e2ffb42d75..b514f09b0e 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -3930,14 +3930,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
FundTransaction(pwallet, rawTx, fee, change_position, request.params[3]);
// Make a blank psbt
- PartiallySignedTransaction psbtx;
- psbtx.tx = rawTx;
- for (unsigned int i = 0; i < rawTx.vin.size(); ++i) {
- psbtx.inputs.push_back(PSBTInput());
- }
- for (unsigned int i = 0; i < rawTx.vout.size(); ++i) {
- psbtx.outputs.push_back(PSBTOutput());
- }
+ PartiallySignedTransaction psbtx(rawTx);
// Fill transaction with out data but don't sign
bool bip32derivs = request.params[4].isNull() ? false : request.params[4].get_bool();