forked from lthn/blockchain
gui: more careful logging
This commit is contained in:
parent
11850a1e05
commit
4432ecbe08
2 changed files with 21 additions and 12 deletions
|
|
@ -751,13 +751,18 @@ bool MainWindow::update_wallet_status(const view::wallet_status_info& wsi)
|
|||
{
|
||||
TRY_ENTRY();
|
||||
m_wallet_states->operator [](wsi.wallet_id) = wsi.wallet_state;
|
||||
|
||||
std::string json_str_pub;
|
||||
epee::serialization::store_t_to_json(static_cast<const view::wallet_status_info_base&>(wsi), json_str_pub, 0, epee::serialization::eol_lf);
|
||||
LOG_PRINT_L0(get_wallet_log_prefix(wsi.wallet_id) + "SENDING SIGNAL -> [update_wallet_status]:" << std::endl << json_str_pub);
|
||||
|
||||
std::string json_str;
|
||||
epee::serialization::store_t_to_json(wsi, json_str, 0, epee::serialization::eol_lf);
|
||||
LOG_PRINT_L0(get_wallet_log_prefix(wsi.wallet_id) + "SENDING SIGNAL -> [update_wallet_status]:" << std::endl << json_str );
|
||||
QMetaObject::invokeMethod(this, "update_wallet_status", Qt::QueuedConnection, Q_ARG(QString, json_str.c_str()));
|
||||
return true;
|
||||
CATCH_ENTRY2(false);
|
||||
}
|
||||
|
||||
bool MainWindow::set_options(const view::gui_options& opt)
|
||||
{
|
||||
TRY_ENTRY();
|
||||
|
|
|
|||
|
|
@ -173,10 +173,22 @@ public:
|
|||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
struct wallet_status_info_base
|
||||
{
|
||||
uint64_t wallet_id;
|
||||
uint64_t wallet_state;
|
||||
bool is_mining;
|
||||
bool is_alias_operations_available;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(wallet_id)
|
||||
KV_SERIALIZE(wallet_state)
|
||||
KV_SERIALIZE(is_mining)
|
||||
KV_SERIALIZE(is_alias_operations_available)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
|
||||
|
||||
struct wallet_status_info
|
||||
struct wallet_status_info : public wallet_status_info_base
|
||||
{
|
||||
enum state
|
||||
{
|
||||
|
|
@ -185,11 +197,6 @@ public:
|
|||
wallet_state_error = 3
|
||||
};
|
||||
|
||||
|
||||
uint64_t wallet_id;
|
||||
uint64_t wallet_state;
|
||||
bool is_mining;
|
||||
bool is_alias_operations_available;
|
||||
uint64_t balance;
|
||||
uint64_t unlocked_balance;
|
||||
uint64_t awaiting_in;
|
||||
|
|
@ -197,10 +204,7 @@ public:
|
|||
uint64_t minied_total;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(wallet_id)
|
||||
KV_SERIALIZE(wallet_state)
|
||||
KV_SERIALIZE(is_mining)
|
||||
KV_SERIALIZE(is_alias_operations_available)
|
||||
KV_CHAIN_BASE(wallet_status_info_base)
|
||||
KV_SERIALIZE(balance)
|
||||
KV_SERIALIZE(unlocked_balance)
|
||||
KV_SERIALIZE(awaiting_in)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue