Page MenuHomePhabricator

D14390.id.diff
No OneTemporary

D14390.id.diff

diff --git a/src/psbt.cpp b/src/psbt.cpp
--- a/src/psbt.cpp
+++ b/src/psbt.cpp
@@ -4,6 +4,7 @@
#include <psbt.h>
+#include <util/check.h>
#include <util/strencodings.h>
PartiallySignedTransaction::PartiallySignedTransaction(
@@ -162,7 +163,8 @@
void UpdatePSBTOutput(const SigningProvider &provider,
PartiallySignedTransaction &psbt, int index) {
- const CTxOut &out = psbt.tx->vout.at(index);
+ CMutableTransaction &tx = *Assert(psbt.tx);
+ const CTxOut &out = tx.vout.at(index);
PSBTOutput &psbt_out = psbt.outputs.at(index);
// Fill a SignatureData with output info
@@ -173,9 +175,8 @@
// Note that ProduceSignature is used to fill in metadata (not actual
// signatures), so provider does not need to provide any private keys (it
// can be a HidingSigningProvider).
- MutableTransactionSignatureCreator creator(
- psbt.tx ? &psbt.tx.value() : nullptr, /* index */ 0, out.nValue,
- SigHashType().withForkId());
+ MutableTransactionSignatureCreator creator(&tx, /* index */ 0, out.nValue,
+ SigHashType().withForkId());
ProduceSignature(provider, creator, out.scriptPubKey, sigdata);
// Put redeem_script and key paths, into PSBTOutput.

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 26, 10:57 (10 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5572942
Default Alt Text
D14390.id.diff (1 KB)

Event Timeline