Merge bitcoin/bitcoin#28728: wallet: [bugfix] Mark CNoDestination and PubKeyDestination constructor explicit
1111475b41bugfix: Mark CNoDestination and PubKeyDestination constructor explicit (MarcoFalke)fa5ccc4137iwyu: Export prevector.h from script.h (MarcoFalke) Pull request description: It seems confusing to allow any script, even one with a corresponding address, to silently convert to `CNoDestination`. Make the converstion `explicit` in the code, and fix any bugs that were previously introduced. In a follow-up, the class can be renamed, or the documentation can be updated to better reflect what the code does. ACKs for top commit: josibake: ACK https://github.com/bitcoin/bitcoin/commit/1111475b41698260cda0f25a96c051fd18d66129 achow101: ACK1111475b41furszy: Code review ACK1111475Tree-SHA512: d8b5f54d0cd8649a31e227ef164bb13e5b81ee9820f1976fd70c7a0de6841fba72d549c2f63e351c8cdda37dceb4763eca203e1c8ef385f46d9da6f1855c39ec
This commit is contained in:
7 files changed
+26
-19
No files matched your search
@@ -187,8 +187,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
|
||||
setAddress.insert(rcp.address);
|
||||
++nAddresses;
|
||||
|
||||
CScript scriptPubKey = GetScriptForDestination(DecodeDestination(rcp.address.toStdString()));
|
||||
CRecipient recipient = {scriptPubKey, rcp.amount, rcp.fSubtractFeeFromAmount};
|
||||
CRecipient recipient{DecodeDestination(rcp.address.toStdString()), rcp.amount, rcp.fSubtractFeeFromAmount};
|
||||
vecSend.push_back(recipient);
|
||||
|
||||
total += rcp.amount;
|
||||
|
||||
Reference in new issue
Block a user