From bb6dea509e97700689ff50e99545f1174ed5cdf9 Mon Sep 17 00:00:00 2001 From: sowle Date: Mon, 7 Jun 2021 15:00:58 +0300 Subject: [PATCH] wallet resync-on-load issue fixed (the bug was in data storing on Boost > 69), also Zano made compatible with Boost 1.72 --- contrib/eos_portable_archive/eos/portable_oarchive.hpp | 2 +- src/pch/stdafx.h | 1 - src/wallet/wallet2.cpp | 5 +---- src/wallet/wallet2.h | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/contrib/eos_portable_archive/eos/portable_oarchive.hpp b/contrib/eos_portable_archive/eos/portable_oarchive.hpp index fce2bd26..5f390194 100644 --- a/contrib/eos_portable_archive/eos/portable_oarchive.hpp +++ b/contrib/eos_portable_archive/eos/portable_oarchive.hpp @@ -340,7 +340,7 @@ namespace eos { // we choose to use little endian because this way we just // save the first size bytes to the stream and skip the rest #if BOOST_VERSION >= 106900 - temp = endian::native_to_little(temp); + temp = endian::native_to_little(t); #else endian::store_little_endian(&temp, t); #endif diff --git a/src/pch/stdafx.h b/src/pch/stdafx.h index 7aec3431..a1aa51ed 100644 --- a/src/pch/stdafx.h +++ b/src/pch/stdafx.h @@ -67,7 +67,6 @@ POP_VS_WARNINGS #include #include #include -#include #include #include #include diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 9c8c9c33..d0456a00 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2389,10 +2389,6 @@ bool wallet2::deinit() bool wallet2::clear() { reset_all(); - //currency::block b; - //currency::generate_genesis_block(b); - m_chain.clear(); - //m_blockchain.push_back(get_block_hash(b)); return true; } //---------------------------------------------------------------------------------------------------- @@ -2666,6 +2662,7 @@ void wallet2::load(const std::wstring& wallet_, const std::string& password) bool need_to_resync = false; if (wbh.m_ver == 1000) { + // old WALLET_FILE_BINARY_HEADER_VERSION version means no encryption need_to_resync = !tools::portable_unserialize_obj_from_stream(*this, data_file); } else diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index f1ab885e..6723795c 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -707,7 +707,7 @@ namespace tools if (ver < 149) { - WLT_LOG_MAGENTA("Wallet file truncated due to old version", LOG_LEVEL_0); + WLT_LOG_MAGENTA("Wallet file truncated due to old version: " << ver, LOG_LEVEL_0); return; }