From bdb5af0490c58616a56c1fd9d93d2c3afa684340 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Thu, 5 Oct 2023 14:44:27 +0200 Subject: [PATCH] added votes state logging --- src/wallet/wallet2.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 1275b88b..ba704480 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -176,6 +176,19 @@ void wallet2::init(const std::string& daemon_address) //m_miner_text_info = PROJECT_VERSION_LONG; m_core_proxy->set_connection_addr(daemon_address); m_core_proxy->check_connection(); + + std::stringstream ss; + const tools::wallet_public::wallet_vote_config& votes = this->get_current_votes(); + if (votes.entries.size()) + { + ss << "VOTING SET LOADED:"; + for (const auto& e : votes.entries) + { + ss << "\t\t" << e.proposal_id << "\t\t" << (e.vote ? "1" : "0") << "\t\t(" << e.h_start << " - " << e.h_end << ")"; + } + } + WLT_LOG_L0(ss.str()); + } //---------------------------------------------------------------------------------------------------- bool wallet2::set_core_proxy(const std::shared_ptr& proxy)