aboutsummaryrefslogtreecommitdiff
path: root/src/blockfilter.cpp
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-09-11 14:58:22 +0000
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-09-19 14:19:57 +0000
commitfa4a9c0f4334678fb80358ead667807bf2a0a153 (patch)
tree027945491283d0c943ca2f704c8f499253311a32 /src/blockfilter.cpp
parentf01416e23c9c820517c37003a2a98dd46d1022ba (diff)
downloadbitcoin-fa4a9c0f4334678fb80358ead667807bf2a0a153.tar.xz
Remove unused GetType() from OverrideStream, CVectorWriter, SpanReader
GetType() is never called, so it is completely unused and can be removed.
Diffstat (limited to 'src/blockfilter.cpp')
-rw-r--r--src/blockfilter.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/blockfilter.cpp b/src/blockfilter.cpp
index 985a81f522..dd3824fb1c 100644
--- a/src/blockfilter.cpp
+++ b/src/blockfilter.cpp
@@ -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);