mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Remove unused GetType() from OverrideStream, CVectorWriter, SpanReader
GetType() is never called, so it is completely unused and can be removed.
This commit is contained in:
@@ -16,9 +16,6 @@
|
||||
#include <util/golombrice.h>
|
||||
#include <util/string.h>
|
||||
|
||||
/// SerType used to serialize parameters in GCS filter encoding.
|
||||
static constexpr int GCS_SER_TYPE = SER_NETWORK;
|
||||
|
||||
/// Protocol version used to serialize parameters in GCS filter encoding.
|
||||
static constexpr int GCS_SER_VERSION = 0;
|
||||
|
||||
@@ -52,7 +49,7 @@ GCSFilter::GCSFilter(const Params& params)
|
||||
GCSFilter::GCSFilter(const Params& params, std::vector<unsigned char> encoded_filter, bool skip_decode_check)
|
||||
: m_params(params), m_encoded(std::move(encoded_filter))
|
||||
{
|
||||
SpanReader stream{GCS_SER_TYPE, GCS_SER_VERSION, m_encoded};
|
||||
SpanReader stream{GCS_SER_VERSION, m_encoded};
|
||||
|
||||
uint64_t N = ReadCompactSize(stream);
|
||||
m_N = static_cast<uint32_t>(N);
|
||||
@@ -84,7 +81,7 @@ GCSFilter::GCSFilter(const Params& params, const ElementSet& elements)
|
||||
}
|
||||
m_F = static_cast<uint64_t>(m_N) * static_cast<uint64_t>(m_params.m_M);
|
||||
|
||||
CVectorWriter stream(GCS_SER_TYPE, GCS_SER_VERSION, m_encoded, 0);
|
||||
CVectorWriter stream(GCS_SER_VERSION, m_encoded, 0);
|
||||
|
||||
WriteCompactSize(stream, m_N);
|
||||
|
||||
@@ -106,7 +103,7 @@ GCSFilter::GCSFilter(const Params& params, const ElementSet& elements)
|
||||
|
||||
bool GCSFilter::MatchInternal(const uint64_t* element_hashes, size_t size) const
|
||||
{
|
||||
SpanReader stream{GCS_SER_TYPE, GCS_SER_VERSION, m_encoded};
|
||||
SpanReader stream{GCS_SER_VERSION, m_encoded};
|
||||
|
||||
// Seek forward by size of N
|
||||
uint64_t N = ReadCompactSize(stream);
|
||||
|
||||
Reference in New Issue
Block a user