diff options
| author | Gregory Sanders <[email protected]> | 2018-03-16 14:33:29 -0400 |
|---|---|---|
| committer | Gregory Sanders <[email protected]> | 2018-03-23 08:56:08 -0400 |
| commit | cf6ef3c1397fb41eb62ba5bc28a9a34a12f3b9aa (patch) | |
| tree | b2b508b7420d26954f796dad2d2ee1770d175f75 /src | |
| parent | Merge #11536: Rename account to label where appropriate (diff) | |
| download | discoin-cf6ef3c1397fb41eb62ba5bc28a9a34a12f3b9aa.tar.xz discoin-cf6ef3c1397fb41eb62ba5bc28a9a34a12f3b9aa.zip | |
shuffle sendmany recipients ordering to shuffle tx outputs
Diffstat (limited to 'src')
| -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 dbc48834f..365dedfce 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; |