| 266 | } |
| 267 | |
| 268 | bool 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 | |
| 285 | bool BlockFilterIndex::CustomRemove(const interfaces::BlockInfo& block) |
| 286 | { |
no test coverage detected