diff options
author | Gregory Sanders <gsanders87@gmail.com> | 2018-03-16 14:33:29 -0400 |
---|---|---|
committer | Gregory Sanders <gsanders87@gmail.com> | 2018-03-23 08:56:08 -0400 |
commit | cf6ef3c1397fb41eb62ba5bc28a9a34a12f3b9aa (patch) | |
tree | b2b508b7420d26954f796dad2d2ee1770d175f75 /src/wallet | |
parent | cead84b72d27517338ac3c49eaaed4db07352f41 (diff) |
shuffle sendmany recipients ordering to shuffle tx outputs
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index dbc48834ff..365dedfceb 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -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; |