Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13711210
D14390.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D14390.id.diff
View Options
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
Details
Attached
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)
Attached To
D14390: psbt: Assert that tx has a value in UpdatePSBTOutput
Event Timeline
Log In to Comment