Skip to content

Commit cf6ef3c

Browse files
committed
shuffle sendmany recipients ordering to shuffle tx outputs
1 parent cead84b commit cf6ef3c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,9 @@ UniValue sendmany(const JSONRPCRequest& request)
11451145
if (totalAmount > nBalance)
11461146
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
11471147

1148+
// Shuffle recipient list
1149+
std::shuffle(vecSend.begin(), vecSend.end(), FastRandomContext());
1150+
11481151
// Send
11491152
CReserveKey keyChange(pwallet);
11501153
CAmount nFeeRequired = 0;

0 commit comments

Comments
 (0)