aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/rawtransaction.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2021-03-03 16:47:44 -0800
committerPieter Wuille <pieter@wuille.net>2021-06-12 12:25:28 -0700
commitfd3f6890f3dfd683f6f13db912caf5c4288adf08 (patch)
treef59709a19027dfdc7e012189cacf72527f20d761 /src/rpc/rawtransaction.cpp
parent5cb6502ac5730ea453edbec4c46027ac2ada97e0 (diff)
downloadbitcoin-fd3f6890f3dfd683f6f13db912caf5c4288adf08.tar.xz
Construct and use PrecomputedTransactionData in PSBT signing
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r--src/rpc/rawtransaction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 414c6637a5..2fa033aee3 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -1655,6 +1655,7 @@ static RPCHelpMan utxoupdatepsbt()
}
// Fill the inputs
+ const PrecomputedTransactionData txdata = PrecomputePSBTData(psbtx);
for (unsigned int i = 0; i < psbtx.tx->vin.size(); ++i) {
PSBTInput& input = psbtx.inputs.at(i);
@@ -1671,7 +1672,7 @@ static RPCHelpMan utxoupdatepsbt()
// Update script/keypath information using descriptor data.
// Note that SignPSBTInput does a lot more than just constructing ECDSA signatures
// we don't actually care about those here, in fact.
- SignPSBTInput(public_provider, psbtx, i, /* sighash_type */ 1);
+ SignPSBTInput(public_provider, psbtx, i, &txdata, /* sighash_type */ 1);
}
// Update script/keypath information using descriptor data.