Remove sharp edge (uninitialized m_filter_type) when using the compiler-generated constructor for BlockFilter

This commit is contained in:
practicalswift
2019-03-04 19:52:50 +01:00
parent 2d46f1be0c
commit 82c3b3f8e0
3 changed files with 11 additions and 2 deletions

View File

@@ -83,9 +83,10 @@ public:
constexpr uint8_t BASIC_FILTER_P = 19;
constexpr uint32_t BASIC_FILTER_M = 784931;
enum BlockFilterType : uint8_t
enum class BlockFilterType : uint8_t
{
BASIC = 0,
INVALID = 255,
};
/**
@@ -95,7 +96,7 @@ enum BlockFilterType : uint8_t
class BlockFilter
{
private:
BlockFilterType m_filter_type;
BlockFilterType m_filter_type = BlockFilterType::INVALID;
uint256 m_block_hash;
GCSFilter m_filter;