| 76 | {} |
| 77 | |
| 78 | CBlockLocator BaseIndex::DB::ReadBestBlock() const |
| 79 | { |
| 80 | CBlockLocator locator; |
| 81 | |
| 82 | bool success = Read(DB_BEST_BLOCK, locator); |
| 83 | if (!success) { |
| 84 | locator.SetNull(); |
| 85 | } |
| 86 | |
| 87 | return locator; |
| 88 | } |
| 89 | |
| 90 | void BaseIndex::DB::WriteBestBlock(CDBBatch& batch, const CBlockLocator& locator) |
| 91 | { |