mirror of
https://git.wownero.com/wownero/wownero.git
synced 2025-01-08 19:58:52 +00:00
Fix output shuffling for multisig
This commit is contained in:
parent
d78fe99ac6
commit
195e309465
@ -315,9 +315,10 @@ namespace cryptonote
|
|||||||
tx.vin.push_back(input_to_key);
|
tx.vin.push_back(input_to_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
// "Shuffle" outs
|
if (shuffle_outs)
|
||||||
std::vector<tx_destination_entry> shuffled_dsts(destinations);
|
{
|
||||||
std::shuffle(shuffled_dsts.begin(), shuffled_dsts.end(), std::default_random_engine(crypto::rand<unsigned int>()));
|
std::shuffle(destinations.begin(), destinations.end(), std::default_random_engine(crypto::rand<unsigned int>()));
|
||||||
|
}
|
||||||
|
|
||||||
// sort ins by their key image
|
// sort ins by their key image
|
||||||
std::vector<size_t> ins_order(sources.size());
|
std::vector<size_t> ins_order(sources.size());
|
||||||
@ -364,7 +365,7 @@ namespace cryptonote
|
|||||||
uint64_t summary_outs_money = 0;
|
uint64_t summary_outs_money = 0;
|
||||||
//fill outputs
|
//fill outputs
|
||||||
size_t output_index = 0;
|
size_t output_index = 0;
|
||||||
for(const tx_destination_entry& dst_entr: shuffled_dsts)
|
for(const tx_destination_entry& dst_entr: destinations)
|
||||||
{
|
{
|
||||||
CHECK_AND_ASSERT_MES(dst_entr.amount > 0 || tx.version > 1, false, "Destination with wrong amount: " << dst_entr.amount);
|
CHECK_AND_ASSERT_MES(dst_entr.amount > 0 || tx.version > 1, false, "Destination with wrong amount: " << dst_entr.amount);
|
||||||
crypto::key_derivation derivation;
|
crypto::key_derivation derivation;
|
||||||
|
Loading…
Reference in New Issue
Block a user