aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/block.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/fuzz/block.cpp')
-rw-r--r--src/test/fuzz/block.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/fuzz/block.cpp b/src/test/fuzz/block.cpp
index 9d0ad369a2..f30fa03e0b 100644
--- a/src/test/fuzz/block.cpp
+++ b/src/test/fuzz/block.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2019 The Bitcoin Core developers
+// Copyright (c) 2019-2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -7,8 +7,8 @@
#include <consensus/validation.h>
#include <core_io.h>
#include <core_memusage.h>
-#include <pubkey.h>
#include <primitives/block.h>
+#include <pubkey.h>
#include <streams.h>
#include <test/fuzz/fuzz.h>
#include <validation.h>
@@ -62,4 +62,8 @@ void test_one_input(const std::vector<uint8_t>& buffer)
const size_t raw_memory_size = RecursiveDynamicUsage(block);
const size_t raw_memory_size_as_shared_ptr = RecursiveDynamicUsage(std::make_shared<CBlock>(block));
assert(raw_memory_size_as_shared_ptr > raw_memory_size);
+ CBlock block_copy = block;
+ block_copy.SetNull();
+ const bool is_null = block_copy.IsNull();
+ assert(is_null);
}