aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2024-05-20 22:35:57 -0500
committerluigi1111 <luigi1111w@gmail.com>2024-05-20 22:35:57 -0500
commit3a47cdad13fd8486b7d5559ec004ff49b3b3aa6d (patch)
tree36f61d20bad25b72e830274547509bbbbd5b625a /tests
parentMerge pull request #9243 (diff)
parentreplace 'multisig()' with 'get_multisig_status()' using multisig_account_stat... (diff)
downloadmonero-3a47cdad13fd8486b7d5559ec004ff49b3b3aa6d.tar.xz
Merge pull request #7852
8d94d08 replace 'multisig()' with 'get_multisig_status()' using multisig_account_status and including '.kex_is_done' member (koe)
Diffstat (limited to 'tests')
-rw-r--r--tests/unit_tests/multisig.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/tests/unit_tests/multisig.cpp b/tests/unit_tests/multisig.cpp
index a79b81e84..c044591c1 100644
--- a/tests/unit_tests/multisig.cpp
+++ b/tests/unit_tests/multisig.cpp
@@ -159,12 +159,12 @@ static void check_results(const std::vector<std::string> &intermediate_infos,
for (size_t i = 0; i < wallets.size(); ++i)
{
EXPECT_TRUE(!intermediate_infos[i].empty());
- bool ready;
- uint32_t threshold, total;
- EXPECT_TRUE(wallets[i].multisig(&ready, &threshold, &total));
- EXPECT_TRUE(ready);
- EXPECT_TRUE(threshold == M);
- EXPECT_TRUE(total == wallets.size());
+ const multisig::multisig_account_status ms_status{wallets[i].get_multisig_status()};
+ EXPECT_TRUE(ms_status.multisig_is_active);
+ EXPECT_TRUE(ms_status.kex_is_done);
+ EXPECT_TRUE(ms_status.is_ready);
+ EXPECT_TRUE(ms_status.threshold == M);
+ EXPECT_TRUE(ms_status.total == wallets.size());
wallets[i].decrypt_keys("");
@@ -226,10 +226,8 @@ static void make_wallets(const unsigned int M, const unsigned int N, const bool
}
// wallets should not be multisig yet
- for (const auto &wallet: wallets)
- {
- ASSERT_FALSE(wallet.multisig());
- }
+ for (const auto& wallet: wallets)
+ ASSERT_FALSE(wallet.get_multisig_status().multisig_is_active);
// make wallets multisig, get second round kex messages (if appropriate)
std::vector<std::string> intermediate_infos(wallets.size());
@@ -242,16 +240,15 @@ static void make_wallets(const unsigned int M, const unsigned int N, const bool
++rounds_complete;
// perform kex rounds until kex is complete
- bool ready;
- wallets[0].multisig(&ready);
- while (!ready)
+ multisig::multisig_account_status ms_status{wallets[0].get_multisig_status()};
+ while (!ms_status.is_ready)
{
if (force_update)
intermediate_infos = exchange_round_force_update(wallets, intermediate_infos, rounds_complete + 1);
else
intermediate_infos = exchange_round(wallets, intermediate_infos);
- wallets[0].multisig(&ready);
+ ms_status = wallets[0].get_multisig_status();
++rounds_complete;
}