Merge pull request #2901

ead48f7d core: fix input ordering from v7 (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2017-12-09 19:05:37 +02:00
commit 2808585b24
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 1 additions and 1 deletions

View File

@ -281,7 +281,7 @@ namespace cryptonote
std::sort(ins_order.begin(), ins_order.end(), [&](const size_t i0, const size_t i1) { std::sort(ins_order.begin(), ins_order.end(), [&](const size_t i0, const size_t i1) {
const txin_to_key &tk0 = boost::get<txin_to_key>(tx.vin[i0]); const txin_to_key &tk0 = boost::get<txin_to_key>(tx.vin[i0]);
const txin_to_key &tk1 = boost::get<txin_to_key>(tx.vin[i1]); const txin_to_key &tk1 = boost::get<txin_to_key>(tx.vin[i1]);
return memcmp(&tk0.k_image, &tk1.k_image, sizeof(tk0.k_image)) < 0; return memcmp(&tk0.k_image, &tk1.k_image, sizeof(tk0.k_image)) > 0;
}); });
tools::apply_permutation(ins_order, [&] (size_t i0, size_t i1) { tools::apply_permutation(ins_order, [&] (size_t i0, size_t i1) {
std::swap(tx.vin[i0], tx.vin[i1]); std::swap(tx.vin[i0], tx.vin[i1]);