aboutsummaryrefslogtreecommitdiff
path: root/src/blockfilter.h
diff options
context:
space:
mode:
authorJim Posen <jim.posen@gmail.com>2019-06-30 16:23:44 +0200
committerJohn Newbery <john@johnnewbery.com>2020-05-26 17:27:15 -0400
commite535670726952e43483763dfca6fc6ec2f4b0691 (patch)
tree61676f77588cb467311e60b37d8fe9200cb8a74d /src/blockfilter.h
parentbb911ae7f5cbe4974ec61266d2334b95067fa49d (diff)
downloadbitcoin-e535670726952e43483763dfca6fc6ec2f4b0691.tar.xz
[indexes] Fix default [de]serialization of BlockFilter.
This only changes network serialization. Disk serialization does not include the filter_type and is defined in ReadFilterFromDisk()/WriteFilterToDisk().
Diffstat (limited to 'src/blockfilter.h')
-rw-r--r--src/blockfilter.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/blockfilter.h b/src/blockfilter.h
index ff8744b217..96cefbf3b2 100644
--- a/src/blockfilter.h
+++ b/src/blockfilter.h
@@ -144,8 +144,8 @@ public:
template <typename Stream>
void Serialize(Stream& s) const {
- s << m_block_hash
- << static_cast<uint8_t>(m_filter_type)
+ s << static_cast<uint8_t>(m_filter_type)
+ << m_block_hash
<< m_filter.GetEncoded();
}
@@ -154,8 +154,8 @@ public:
std::vector<unsigned char> 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<BlockFilterType>(filter_type);