Remove assert for null block deserialization (#4241)

This commit is contained in:
Piotr Wójcik 2023-05-31 16:46:43 +02:00 committed by GitHub
commit 227fc4d801
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1415,18 +1415,12 @@ std::shared_ptr<nano::block> nano::deserialize_block (nano::stream & stream_a, n
result = ::deserialize_block<nano::state_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);
}