Merge pull request #5266

576116d4 wallet: fix load failure if the mms isn't usable (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2019-03-21 14:51:30 +02:00
commit dcfd5a8892
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
2 changed files with 18 additions and 1 deletions

View File

@ -10007,6 +10007,16 @@ void simple_wallet::mms_auto_config(const std::vector<std::string> &args)
bool simple_wallet::mms(const std::vector<std::string> &args)
{
try
{
m_wallet->get_multisig_wallet_state();
}
catch(const std::exception &e)
{
fail_msg_writer() << tr("MMS not available in this wallet");
return true;
}
try
{
mms::message_store& ms = m_wallet->get_message_store();

View File

@ -5120,7 +5120,14 @@ void wallet2::load(const std::string& wallet_, const epee::wipeable_string& pass
MERROR("Failed to save rings, will try again next time");
}
m_message_store.read_from_file(get_multisig_wallet_state(), m_mms_file);
try
{
m_message_store.read_from_file(get_multisig_wallet_state(), m_mms_file);
}
catch (const std::exception &e)
{
MERROR("Failed to initialize MMS, it will be unusable");
}
}
//----------------------------------------------------------------------------------------------------
void wallet2::trim_hashchain()