Automatically update wallet's cached copy of account objects

whenever we are notified of a change on the blockchain
This commit is contained in:
Viktor 2017-06-02 11:59:46 +03:00
parent 8ae95e1d5c
commit 113903b714

View file

@ -451,6 +451,20 @@ private:
{
// idump((e));
}
try
{
object_id_type id = changed_object_variant["id"].as<account_id_type>();
if (_wallet.my_accounts.find(id) != _wallet.my_accounts.end())
{
account_object account = changed_object_variant.as<account_object>();
_wallet.update_account(account);
}
continue;
}
catch (const fc::exception& e)
{
// idump((e));
}
}
}
}