| 487 | return active.GetLocator(); |
| 488 | } |
| 489 | std::optional<int> findLocatorFork(const CBlockLocator& locator) override |
| 490 | { |
| 491 | LOCK(cs_main); |
| 492 | const CChainState& active = Assert(m_node.chainman)->ActiveChainstate(); |
| 493 | if (CBlockIndex* fork = active.FindForkInGlobalIndex(locator)) { |
| 494 | return fork->nHeight; |
| 495 | } |
| 496 | return std::nullopt; |
| 497 | } |
| 498 | bool findBlock(const uint256& hash, const FoundBlock& block) override |
| 499 | { |
| 500 | WAIT_LOCK(cs_main, lock); |
no test coverage detected