aboutsummaryrefslogtreecommitdiff
path: root/src/multisig/multisig_account.cpp
diff options
context:
space:
mode:
authorj-berman <justinberman@protonmail.com>2022-09-01 16:25:28 -0700
committerj-berman <justinberman@protonmail.com>2022-09-01 16:25:28 -0700
commitfc8a5d68f1f4cbddeddac8a5f0c8f59c2b68229a (patch)
tree643f6a1ad54469e5c2a41c2979ccd1731dc51b01 /src/multisig/multisig_account.cpp
parentMerge pull request #8492 (diff)
downloadmonero-fc8a5d68f1f4cbddeddac8a5f0c8f59c2b68229a.tar.xz
multisig: fix #8537 seed restore (suggestions by @UkoeHB)
- spend secret key is no longer the sum of multisig key shares; no need to check that is the case upon restore. - restoring a multisig wallet from multisig info means that the wallet must have already completed all setup rounds. Upon restore, set the number of rounds completed accordingly.
Diffstat (limited to 'src/multisig/multisig_account.cpp')
-rw-r--r--src/multisig/multisig_account.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/multisig/multisig_account.cpp b/src/multisig/multisig_account.cpp
index 9bdcf2dbc..f3e78da18 100644
--- a/src/multisig/multisig_account.cpp
+++ b/src/multisig/multisig_account.cpp
@@ -127,7 +127,7 @@ namespace multisig
bool multisig_account::multisig_is_ready() const
{
if (main_kex_rounds_done())
- return m_kex_rounds_complete >= multisig_kex_rounds_required(m_signers.size(), m_threshold) + 1;
+ return m_kex_rounds_complete >= multisig_setup_rounds_required(m_signers.size(), m_threshold);
else
return false;
}
@@ -200,4 +200,11 @@ namespace multisig
return num_signers - threshold + 1;
}
//----------------------------------------------------------------------------------------------------------------------
+ // EXTERNAL
+ //----------------------------------------------------------------------------------------------------------------------
+ std::uint32_t multisig_setup_rounds_required(const std::uint32_t num_signers, const std::uint32_t threshold)
+ {
+ return multisig_kex_rounds_required(num_signers, threshold) + 1;
+ }
+ //----------------------------------------------------------------------------------------------------------------------
} //namespace multisig