From 533da12c2c65181f901fd65bb79a78e2f5b41f0e Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Thu, 30 Sep 2021 00:04:56 +0000 Subject: [PATCH] wallet: make sure extra OP_RETURN output is blinded when called from fundraw This is a followup to https://github.com/ElementsProject/elements/pull/588 --- src/wallet/wallet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 02b4805225..5c80fdca90 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3234,6 +3234,8 @@ bool fillBlindDetails(BlindDetails* det, CWallet* wallet, CMutableTransaction& t // We need to make sure to dupe an asset that is in input set //TODO Have blinding do some extremely minimal rangeproof CTxOut newTxOut(det->o_assets.back(), 0, CScript() << OP_RETURN); + CPubKey blind_pub = wallet->GetBlindingPubKey(newTxOut.scriptPubKey); // irrelevent, just needs to be non-null + newTxOut.nNonce.vchCommitment = std::vector(blind_pub.begin(), blind_pub.end()); txNew.vout.push_back(newTxOut); det->o_pubkeys.push_back(wallet->GetBlindingPubKey(newTxOut.scriptPubKey)); det->o_amount_blinds.push_back(uint256());