aboutsummaryrefslogtreecommitdiff
path: root/src/blockfilter.h
diff options
context:
space:
mode:
authorJim Posen <jim.posen@gmail.com>2018-08-27 15:08:31 -0700
committerJim Posen <jim.posen@gmail.com>2018-11-06 09:12:54 -0800
commitc30620983d2e2c9aee6f52878ed14ba685e8683e (patch)
treeef4dc2869290ff9b0f3902c710ba8d94fdeccc64 /src/blockfilter.h
parent20b812993ae584e4a4b12faa5c8751aa04dfde81 (diff)
downloadbitcoin-c30620983d2e2c9aee6f52878ed14ba685e8683e.tar.xz
blockfilter: Additional constructors for BlockFilter.
Diffstat (limited to 'src/blockfilter.h')
-rw-r--r--src/blockfilter.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/blockfilter.h b/src/blockfilter.h
index e53f813ab3..4d1f51dd60 100644
--- a/src/blockfilter.h
+++ b/src/blockfilter.h
@@ -103,11 +103,17 @@ private:
public:
- // Construct a new BlockFilter of the specified type from a block.
+ BlockFilter() = default;
+
+ //! Reconstruct a BlockFilter from parts.
+ BlockFilter(BlockFilterType filter_type, const uint256& block_hash,
+ std::vector<unsigned char> filter);
+
+ //! Construct a new BlockFilter of the specified type from a block.
BlockFilter(BlockFilterType filter_type, const CBlock& block, const CBlockUndo& block_undo);
BlockFilterType GetFilterType() const { return m_filter_type; }
-
+ const uint256& GetBlockHash() const { return m_block_hash; }
const GCSFilter& GetFilter() const { return m_filter; }
const std::vector<unsigned char>& GetEncodedFilter() const
@@ -115,10 +121,10 @@ public:
return m_filter.GetEncoded();
}
- // Compute the filter hash.
+ //! Compute the filter hash.
uint256 GetHash() const;
- // Compute the filter header given the previous one.
+ //! Compute the filter header given the previous one.
uint256 ComputeHeader(const uint256& prev_header) const;
template <typename Stream>