Skip to content

Commit e535670

Browse files
jimpojnewbery
authored andcommitted
[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().
1 parent bb911ae commit e535670

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/blockfilter.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ class BlockFilter
144144

145145
template <typename Stream>
146146
void Serialize(Stream& s) const {
147-
s << m_block_hash
148-
<< static_cast<uint8_t>(m_filter_type)
147+
s << static_cast<uint8_t>(m_filter_type)
148+
<< m_block_hash
149149
<< m_filter.GetEncoded();
150150
}
151151

@@ -154,8 +154,8 @@ class BlockFilter
154154
std::vector<unsigned char> encoded_filter;
155155
uint8_t filter_type;
156156

157-
s >> m_block_hash
158-
>> filter_type
157+
s >> filter_type
158+
>> m_block_hash
159159
>> encoded_filter;
160160

161161
m_filter_type = static_cast<BlockFilterType>(filter_type);

0 commit comments

Comments
 (0)