From 5050df88418c2db724591a42aa75e640c83005a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Sun, 28 May 2023 23:48:36 +0200 Subject: [PATCH] Remove assert for null block deserialization --- nano/lib/blocks.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/nano/lib/blocks.cpp b/nano/lib/blocks.cpp index ab5f9183f0..fab4c2466b 100644 --- a/nano/lib/blocks.cpp +++ b/nano/lib/blocks.cpp @@ -1415,18 +1415,12 @@ std::shared_ptr nano::deserialize_block (nano::stream & stream_a, n result = ::deserialize_block (stream_a); break; } - case nano::block_type::not_a_block: + default: { - // Skip null block terminators return {}; } - default: -#ifndef NANO_FUZZER_TEST - debug_assert (false); -#endif - break; } - if (uniquer_a != nullptr) + if (result && uniquer_a != nullptr) { result = uniquer_a->unique (result); }