shuffle sendmany recipients ordering to shuffle tx outputs
This commit is contained in:
parent
cead84b72d
commit
cf6ef3c139
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue