| 112 | } |
| 113 | |
| 114 | static const CBlockIndex* NextSyncBlock(const CBlockIndex* pindex_prev, CChain& chain) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| 115 | { |
| 116 | AssertLockHeld(cs_main); |
| 117 | |
| 118 | if (!pindex_prev) { |
| 119 | return chain.Genesis(); |
| 120 | } |
| 121 | |
| 122 | const CBlockIndex* pindex = chain.Next(pindex_prev); |
| 123 | if (pindex) { |
| 124 | return pindex; |
| 125 | } |
| 126 | |
| 127 | return chain.Next(chain.FindFork(pindex_prev)); |
| 128 | } |
| 129 | |
| 130 | void BaseIndex::ThreadSync() |
| 131 | { |
no test coverage detected