From e7851de6f7428d706230a8c6be09dbcd99ca711f Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Fri, 8 May 2020 00:52:30 +0200 Subject: [PATCH] added parameter for initial wallet height --- src/wallet/plain_wallet_api_defs.h | 18 +++++++++--------- src/wallet/view_iface.h | 2 ++ src/wallet/wallets_manager.cpp | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/wallet/plain_wallet_api_defs.h b/src/wallet/plain_wallet_api_defs.h index 3ae7bdfa..9273d524 100644 --- a/src/wallet/plain_wallet_api_defs.h +++ b/src/wallet/plain_wallet_api_defs.h @@ -19,15 +19,15 @@ namespace plain_wallet }; - struct open_wallet_response - { - view::transfers_array recent_history; - view::wallet_info wi; - BEGIN_KV_SERIALIZE_MAP() - KV_SERIALIZE(recent_history) - KV_SERIALIZE(wi) - END_KV_SERIALIZE_MAP() - }; +// struct open_wallet_response +// { +// view::transfers_array recent_history; +// view::wallet_info wi; +// BEGIN_KV_SERIALIZE_MAP() +// KV_SERIALIZE(recent_history) +// KV_SERIALIZE(wi) +// END_KV_SERIALIZE_MAP() +// }; struct sync_status_response { diff --git a/src/wallet/view_iface.h b/src/wallet/view_iface.h index b95369de..7a321855 100644 --- a/src/wallet/view_iface.h +++ b/src/wallet/view_iface.h @@ -431,6 +431,7 @@ public: wallet_info wi; std::string seed; bool recovered; + uint64_t wallet_local_height; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(wallet_id) @@ -438,6 +439,7 @@ public: KV_SERIALIZE(wi) KV_SERIALIZE(seed) KV_SERIALIZE(recovered) + KV_SERIALIZE(wallet_local_height) END_KV_SERIALIZE_MAP() }; diff --git a/src/wallet/wallets_manager.cpp b/src/wallet/wallets_manager.cpp index 1342a4d9..627ecabe 100644 --- a/src/wallet/wallets_manager.cpp +++ b/src/wallet/wallets_manager.cpp @@ -760,6 +760,7 @@ std::string wallets_manager::open_wallet(const std::wstring& path, const std::st w->get_recent_transfers_history(owr.recent_history.history, 0, txs_to_return, owr.recent_history.total_history_items); //w->get_unconfirmed_transfers(owr.recent_history.unconfirmed); w->get_unconfirmed_transfers(owr.recent_history.history); + owr.wallet_local_bc_size = w->get_blockchain_current_size(); //workaround for missed fee owr.seed = w->get_account().get_restore_braindata(); break;