Add mostly-static checks on consistency of Equihash parameters, MAX_HEADERS_RESULTS, and MAX_PROTOCOL_MESSAGE_LENGTH.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
13
src/gtest/test_block.cpp
Normal file
13
src/gtest/test_block.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "primitives/block.h"
|
||||
|
||||
|
||||
TEST(block_tests, header_size_is_expected) {
|
||||
// Dummy header with an empty Equihash solution.
|
||||
CBlockHeader header;
|
||||
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ss << header;
|
||||
|
||||
ASSERT_EQ(ss.size(), CBlockHeader::HEADER_SIZE);
|
||||
}
|
||||
Reference in New Issue
Block a user