From eb91f2864a4cf3896e43fd307f841a7ac4b13452 Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Sun, 30 Jun 2019 16:23:44 +0200 Subject: [PATCH] [indexes] Fix default [de]serialization of BlockFilter. This only changes network serialization. Disk serialization is defined in ReadFilterFromDisk() and WriteFilterToDisk() and does not include the filter_type. Github-Pull: #18876 Rebased-From: 5335fa8ad70958abcf81bec05a881640444a46d8 --- src/blockfilter.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blockfilter.h b/src/blockfilter.h index ff8744b2179b7..96cefbf3b2f9f 100644 --- a/src/blockfilter.h +++ b/src/blockfilter.h @@ -144,8 +144,8 @@ class BlockFilter template void Serialize(Stream& s) const { - s << m_block_hash - << static_cast(m_filter_type) + s << static_cast(m_filter_type) + << m_block_hash << m_filter.GetEncoded(); } @@ -154,8 +154,8 @@ class BlockFilter std::vector encoded_filter; uint8_t filter_type; - s >> m_block_hash - >> filter_type + s >> filter_type + >> m_block_hash >> encoded_filter; m_filter_type = static_cast(filter_type);