| 528 | return FillBlock(ancestor, ancestor_out, lock, active); |
| 529 | } |
| 530 | bool findCommonAncestor(const uint256& block_hash1, const uint256& block_hash2, const FoundBlock& ancestor_out, const FoundBlock& block1_out, const FoundBlock& block2_out) override |
| 531 | { |
| 532 | WAIT_LOCK(cs_main, lock); |
| 533 | const CChain& active = Assert(m_node.chainman)->ActiveChain(); |
| 534 | const CBlockIndex* block1 = m_node.chainman->m_blockman.LookupBlockIndex(block_hash1); |
| 535 | const CBlockIndex* block2 = m_node.chainman->m_blockman.LookupBlockIndex(block_hash2); |
| 536 | const CBlockIndex* ancestor = block1 && block2 ? LastCommonAncestor(block1, block2) : nullptr; |
| 537 | // Using & instead of && below to avoid short circuiting and leaving |
| 538 | // output uninitialized. Cast bool to int to avoid -Wbitwise-instead-of-logical |
| 539 | // compiler warnings. |
| 540 | return int{FillBlock(ancestor, ancestor_out, lock, active)} & |
| 541 | int{FillBlock(block1, block1_out, lock, active)} & |
| 542 | int{FillBlock(block2, block2_out, lock, active)}; |
| 543 | } |
| 544 | void findCoins(std::map<COutPoint, Coin>& coins) override { return FindCoins(m_node, coins); } |
| 545 | double guessVerificationProgress(const uint256& block_hash) override |
| 546 | { |