mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
[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().
This commit is contained in:
@@ -144,8 +144,8 @@ public:
|
|||||||
|
|
||||||
template <typename Stream>
|
template <typename Stream>
|
||||||
void Serialize(Stream& s) const {
|
void Serialize(Stream& s) const {
|
||||||
s << m_block_hash
|
s << static_cast<uint8_t>(m_filter_type)
|
||||||
<< static_cast<uint8_t>(m_filter_type)
|
<< m_block_hash
|
||||||
<< m_filter.GetEncoded();
|
<< m_filter.GetEncoded();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,8 +154,8 @@ public:
|
|||||||
std::vector<unsigned char> encoded_filter;
|
std::vector<unsigned char> encoded_filter;
|
||||||
uint8_t filter_type;
|
uint8_t filter_type;
|
||||||
|
|
||||||
s >> m_block_hash
|
s >> filter_type
|
||||||
>> filter_type
|
>> m_block_hash
|
||||||
>> encoded_filter;
|
>> encoded_filter;
|
||||||
|
|
||||||
m_filter_type = static_cast<BlockFilterType>(filter_type);
|
m_filter_type = static_cast<BlockFilterType>(filter_type);
|
||||||
|
|||||||
Reference in New Issue
Block a user