From 5522a04e3bee9cc18b3502b0d6b16fb55a1f4e48 Mon Sep 17 00:00:00 2001 From: Wesley Shillingford Date: Tue, 5 Feb 2019 17:19:35 +0000 Subject: [PATCH] Fix build missed deserializer changes (#1703) --- nano/node/node.cpp | 2 +- nano/secure/common.cpp | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/nano/node/node.cpp b/nano/node/node.cpp index 5797e57be8..445ca813f3 100644 --- a/nano/node/node.cpp +++ b/nano/node/node.cpp @@ -1399,9 +1399,9 @@ node (init_a, io_ctx_a, application_path_a, alarm_a, nano::node_config (peering_ nano::node::node (nano::node_init & init_a, boost::asio::io_context & io_ctx_a, boost::filesystem::path const & application_path_a, nano::alarm & alarm_a, nano::node_config const & config_a, nano::work_pool & work_a, nano::node_flags flags_a) : io_ctx (io_ctx_a), config (config_a), +flags (flags_a), alarm (alarm_a), work (work_a), -flags (flags_a), store_impl (std::make_unique (init_a.block_store_init, config.logging, application_path_a / "data.ldb", config_a.lmdb_max_dbs, !flags.disable_unchecked_drop, flags.sideband_batch_size)), store (*store_impl), wallets_store_impl (std::make_unique (init_a.wallets_store_init, application_path_a / "wallets.ldb", config_a.lmdb_max_dbs)), diff --git a/nano/secure/common.cpp b/nano/secure/common.cpp index f8476ca7ac..6b545103db 100644 --- a/nano/secure/common.cpp +++ b/nano/secure/common.cpp @@ -342,14 +342,15 @@ bool nano::unchecked_info::deserialize (nano::stream & stream_a) bool error (block == nullptr); if (!error) { - error = nano::read (stream_a, account.bytes); - if (!error) + try { - error = nano::read (stream_a, modified); - if (!error) - { - error = nano::read (stream_a, verified); - } + nano::read (stream_a, account.bytes); + nano::read (stream_a, modified); + nano::read (stream_a, verified); + } + catch (std::runtime_error const &) + { + error = true; } } return error;