| 13 | using node::BlockManager; |
| 14 | |
| 15 | bool ComputeFilter(BlockFilterType filter_type, const CBlockIndex& block_index, BlockFilter& filter, const BlockManager& blockman) |
| 16 | { |
| 17 | LOCK(::cs_main); |
| 18 | |
| 19 | CBlock block; |
| 20 | if (!blockman.ReadBlock(block, block_index)) { |
| 21 | return false; |
| 22 | } |
| 23 | |
| 24 | CBlockUndo block_undo; |
| 25 | if (block_index.nHeight > 0 && !blockman.ReadBlockUndo(block_undo, block_index)) { |
| 26 | return false; |
| 27 | } |
| 28 | |
| 29 | filter = BlockFilter(filter_type, block, block_undo); |
| 30 | return true; |
| 31 | } |
no test coverage detected