diff options
| author | Glenn Willen <[email protected]> | 2018-10-26 15:26:16 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2018-12-03 10:35:34 -0800 |
| commit | 70ee1f8709a54a9aeac004d8589faa08f665587a (patch) | |
| tree | e4354a95bd1d8e8737fb5dd50e11fc3e436308fb /src/wallet/rpcwallet.cpp | |
| parent | Remove redundant txConst parameter to FillPSBT (diff) | |
| download | discoin-70ee1f8709a54a9aeac004d8589faa08f665587a.tar.xz discoin-70ee1f8709a54a9aeac004d8589faa08f665587a.zip | |
New PartiallySignedTransaction constructor from CTransction
New constructor that creates a PartiallySignedTransaction from a
CTransaction, automatically sizing the inputs and outputs vectors for
convenience.
Github-Pull: #14588
Rebased-From: 65166d4cf828909dc4bc49dd68a58103d015f1fd
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
| -rw-r--r-- | src/wallet/rpcwallet.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 24df23edd..ec103c676 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4737,14 +4737,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(); |