diff options
author | j-berman <justinberman@protonmail.com> | 2022-09-01 16:25:28 -0700 |
---|---|---|
committer | j-berman <justinberman@protonmail.com> | 2022-09-06 11:59:25 -0600 |
commit | 564a7a31e8f52bcee4a6ab9f3451305db9f16f7b (patch) | |
tree | 56b5b21608152a05116a10dc6ae389122c41e913 /src/multisig/multisig_account.h | |
parent | Merge pull request #8435 (diff) | |
download | monero-564a7a31e8f52bcee4a6ab9f3451305db9f16f7b.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.h')
-rw-r--r-- | src/multisig/multisig_account.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/multisig/multisig_account.h b/src/multisig/multisig_account.h index 7b372bbff..7beb594b4 100644 --- a/src/multisig/multisig_account.h +++ b/src/multisig/multisig_account.h @@ -245,4 +245,13 @@ namespace multisig * return: number of kex rounds required */ std::uint32_t multisig_kex_rounds_required(const std::uint32_t num_signers, const std::uint32_t threshold); + + /** + * brief: multisig_setup_rounds_required - The number of setup rounds required to produce an M-of-N shared key. + * - A participant must complete all kex rounds and 1 initialization round. + * param: num_signers - number of participants in multisig (N) + * param: threshold - threshold of multisig (M) + * return: number of setup rounds required + */ + std::uint32_t multisig_setup_rounds_required(const std::uint32_t num_signers, const std::uint32_t threshold); } //namespace multisig |