Automatically update wallet's cached copy of account objects

whenever we are notified of a change on the blockchain
This commit is contained in:
Eric Frias 2017-06-01 16:58:56 -04:00
parent 3cc82f0022
commit 7a2eb92563

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));
}
}
}
}