wallet: guard against partly initialized multisig wallet

This commit is contained in:
moneromooo-monero 2017-10-01 14:06:54 +01:00
parent 66e34e85b1
commit 265290388b
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
6 changed files with 82 additions and 19 deletions

View file

@ -3039,7 +3039,7 @@ bool wallet2::verify_extra_multisig_info(const std::string &data, std::unordered
return true;
}
bool wallet2::multisig(uint32_t *threshold, uint32_t *total) const
bool wallet2::multisig(bool *ready, uint32_t *threshold, uint32_t *total) const
{
if (!m_multisig)
return false;
@ -3047,6 +3047,8 @@ bool wallet2::multisig(uint32_t *threshold, uint32_t *total) const
*threshold = m_multisig_threshold;
if (total)
*total = m_multisig_signers.size();
if (ready)
*ready = !(get_account().get_keys().m_account_address.m_spend_public_key == rct::rct2pk(rct::identity()));
return true;
}