MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Write

Method Write

src/index/blockfilterindex.cpp:268–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268bool BlockFilterIndex::Write(const BlockFilter& filter, uint32_t block_height, const uint256& filter_header)
269{
270 size_t bytes_written = WriteFilterToDisk(m_next_filter_pos, filter);
271 if (bytes_written == 0) return false;
272
273 std::pair<uint256, DBVal> value;
274 value.first = filter.GetBlockHash();
275 value.second.hash = filter.GetHash();
276 value.second.header = filter_header;
277 value.second.pos = m_next_filter_pos;
278
279 m_db->Write(index_util::DBHeightKey(block_height), value);
280
281 m_next_filter_pos.nPos += bytes_written;
282 return true;
283}
284
285bool BlockFilterIndex::CustomRemove(const interfaces::BlockInfo& block)
286{

Callers 9

CustomAppendMethod · 0.45
CustomCommitMethod · 0.45
WriteBestBlockMethod · 0.45
TxoSpenderIndexMethod · 0.45
WriteSpenderInfosMethod · 0.45
WriteTxsMethod · 0.45
CustomCommitMethod · 0.45
CustomRemoveMethod · 0.45

Calls 3

DBHeightKeyClass · 0.85
GetBlockHashMethod · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected