From fa5697127f5a99ddd20311cec8180f6a89b31ceb Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 21 Oct 2017 12:14:31 +0100 Subject: make multisig work with subaddresses Thanks to kenshi84 for help getting this work --- tests/core_tests/multisig.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/core_tests/multisig.cpp b/tests/core_tests/multisig.cpp index 484b8b7ab..cf63d20f7 100644 --- a/tests/core_tests/multisig.cpp +++ b/tests/core_tests/multisig.cpp @@ -132,8 +132,14 @@ bool gen_multisig_tx_validation_base::generate_with(std::vector> account_L(total); std::vector> account_R(total); std::vector> account_ki(total); + std::vector additional_tx_keys; + std::unordered_map subaddresses; + subaddresses[miner_account[0].get_keys().m_account_address.m_spend_public_key] = {0,0}; for (size_t msidx = 0; msidx < total; ++msidx) { + CHECK_AND_ASSERT_MES(miner_account[msidx].get_keys().m_account_address.m_spend_public_key == miner_account[0].get_keys().m_account_address.m_spend_public_key, + false, "Mismatched spend public keys"); + size_t nlr = threshold < total ? threshold - 1 : 1; account_L[msidx].resize(nlr); account_R[msidx].resize(nlr); @@ -146,7 +152,7 @@ bool gen_multisig_tx_validation_base::generate_with(std::vector subaddresses; - subaddresses[miner_account[creator].get_keys().m_account_address.m_spend_public_key] = {0,0}; - std::vector additional_tx_keys; - r = construct_tx_and_get_tx_key(miner_account[creator].get_keys(), subaddresses, sources, destinations, boost::none, std::vector(), tx, 0, tx_key, additional_tx_keys, true, false, msoutp); + std::vector additional_tx_secret_keys; + r = construct_tx_and_get_tx_key(miner_account[creator].get_keys(), subaddresses, sources, destinations, boost::none, std::vector(), tx, 0, tx_key, additional_tx_secret_keys, true, false, msoutp); CHECK_AND_ASSERT_MES(r, false, "failed to construct transaction"); #ifndef NO_MULTISIG -- cgit v1.2.3