shuffle sendmany recipients ordering to shuffle tx outputs

This commit is contained in:
Gregory Sanders 2018-03-16 14:33:29 -04:00
parent cead84b72d
commit cf6ef3c139

View file

@ -1145,6 +1145,9 @@ UniValue sendmany(const JSONRPCRequest& request)
if (totalAmount > nBalance)
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
// Shuffle recipient list
std::shuffle(vecSend.begin(), vecSend.end(), FastRandomContext());
// Send
CReserveKey keyChange(pwallet);
CAmount nFeeRequired = 0;