Skip to content

Commit

Permalink
Merge pull request #1076 from sumogr/patch-96
Browse files Browse the repository at this point in the history
[wallet2] Fix broken multisig pubkey sorting
  • Loading branch information
sumoprojects authored Aug 12, 2020
2 parents 314a2fc + 79acff8 commit 50731ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5048,7 +5048,7 @@ std::string wallet2::exchange_multisig_keys(const epee::wipeable_string &passwor
m_account.finalize_multisig(spend_public_key);

m_multisig_signers = signers;
std::sort(m_multisig_signers.begin(), m_multisig_signers.end(), [](const crypto::public_key &e0, const crypto::public_key &e1){ return memcmp(&e0, &e1, sizeof(e0)); });
std::sort(m_multisig_signers.begin(), m_multisig_signers.end(), [](const crypto::public_key &e0, const crypto::public_key &e1){ return memcmp(&e0, &e1, sizeof(e0)) < 0; });

++m_multisig_rounds_passed;
m_multisig_derivations.clear();
Expand Down Expand Up @@ -13037,7 +13037,7 @@ size_t wallet2::import_multisig(std::vector<cryptonote::blobdata> blobs)
// sort by signer
if (!info.empty() && !info.front().empty())
{
std::sort(info.begin(), info.end(), [](const std::vector<tools::wallet2::multisig_info> &i0, const std::vector<tools::wallet2::multisig_info> &i1){ return memcmp(&i0[0].m_signer, &i1[0].m_signer, sizeof(i0[0].m_signer)); });
std::sort(info.begin(), info.end(), [](const std::vector<tools::wallet2::multisig_info> &i0, const std::vector<tools::wallet2::multisig_info> &i1){ return memcmp(&i0[0].m_signer, &i1[0].m_signer, sizeof(i0[0].m_signer)) < 0; });
}

// first pass to determine where to detach the blockchain
Expand Down

0 comments on commit 50731ce

Please sign in to comment.