aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-08-27 02:58:53 -0700
committerAlexander Blair <snipa@jagtech.io>2020-08-27 02:58:53 -0700
commit4fe2858b4d32340b2d9b93a70b5606e77ec7dc17 (patch)
treedd40254d8b99e77bce1f5433de986ce65a9b1189
parentMerge pull request #6753 (diff)
parentFix broken multisig pubkey sorting (diff)
downloadmonero-4fe2858b4d32340b2d9b93a70b5606e77ec7dc17.tar.xz
Merge pull request #6746
20f603c6b Fix broken multisig pubkey sorting (Jason Rhinelander)
-rw-r--r--src/wallet/wallet2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 89a9c7da7..5d78bb7b0 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -5053,7 +5053,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();
@@ -13284,7 +13284,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