mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-15 00:59:38 +02:00
shuffle sendmany recipients ordering to shuffle tx outputs
This commit is contained in:
@@ -1145,6 +1145,9 @@ UniValue sendmany(const JSONRPCRequest& request)
|
|||||||
if (totalAmount > nBalance)
|
if (totalAmount > nBalance)
|
||||||
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
|
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
|
||||||
|
|
||||||
|
// Shuffle recipient list
|
||||||
|
std::shuffle(vecSend.begin(), vecSend.end(), FastRandomContext());
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
CReserveKey keyChange(pwallet);
|
CReserveKey keyChange(pwallet);
|
||||||
CAmount nFeeRequired = 0;
|
CAmount nFeeRequired = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user