diff options
Diffstat (limited to 'src/index/coinstatsindex.cpp')
-rw-r--r-- | src/index/coinstatsindex.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/index/coinstatsindex.cpp b/src/index/coinstatsindex.cpp index 4c92bb953a..dff8e50a4e 100644 --- a/src/index/coinstatsindex.cpp +++ b/src/index/coinstatsindex.cpp @@ -138,7 +138,7 @@ bool CoinStatsIndex::CustomAppend(const interfaces::BlockInfo& block) read_out.first.ToString(), expected_block_hash.ToString()); if (!m_db->Read(DBHashKey(expected_block_hash), read_out)) { - error("%s: previous block header not found; expected %s", + LogError("%s: previous block header not found; expected %s\n", __func__, expected_block_hash.ToString()); return false; } @@ -246,14 +246,14 @@ bool CoinStatsIndex::CustomAppend(const interfaces::BlockInfo& block) for (int height = start_height; height <= stop_height; ++height) { if (!db_it.GetKey(key) || key.height != height) { - error("%s: unexpected key in %s: expected (%c, %d)", + LogError("%s: unexpected key in %s: expected (%c, %d)\n", __func__, index_name, DB_BLOCK_HEIGHT, height); return false; } std::pair<uint256, DBVal> value; if (!db_it.GetValue(value)) { - error("%s: unable to read value in %s at key (%c, %d)", + LogError("%s: unable to read value in %s at key (%c, %d)\n", __func__, index_name, DB_BLOCK_HEIGHT, height); return false; } @@ -288,7 +288,7 @@ bool CoinStatsIndex::CustomRewind(const interfaces::BlockKey& current_tip, const CBlock block; if (!m_chainstate->m_blockman.ReadBlockFromDisk(block, *iter_tip)) { - error("%s: Failed to read block %s from disk", + LogError("%s: Failed to read block %s from disk\n", __func__, iter_tip->GetBlockHash().ToString()); return false; } @@ -357,7 +357,7 @@ bool CoinStatsIndex::CustomInit(const std::optional<interfaces::BlockKey>& block // exist. Any other errors indicate database corruption or a disk // failure, and starting the index would cause further corruption. if (m_db->Exists(DB_MUHASH)) { - error("%s: Cannot read current %s state; index may be corrupted", + LogError("%s: Cannot read current %s state; index may be corrupted\n", __func__, GetName()); return false; } @@ -366,7 +366,7 @@ bool CoinStatsIndex::CustomInit(const std::optional<interfaces::BlockKey>& block if (block) { DBVal entry; if (!LookUpOne(*m_db, *block, entry)) { - error("%s: Cannot read current %s state; index may be corrupted", + LogError("%s: Cannot read current %s state; index may be corrupted\n", __func__, GetName()); return false; } @@ -374,7 +374,7 @@ bool CoinStatsIndex::CustomInit(const std::optional<interfaces::BlockKey>& block uint256 out; m_muhash.Finalize(out); if (entry.muhash != out) { - error("%s: Cannot read current %s state; index may be corrupted", + LogError("%s: Cannot read current %s state; index may be corrupted\n", __func__, GetName()); return false; } @@ -429,7 +429,7 @@ bool CoinStatsIndex::ReverseBlock(const CBlock& block, const CBlockIndex* pindex read_out.first.ToString(), expected_block_hash.ToString()); if (!m_db->Read(DBHashKey(expected_block_hash), read_out)) { - error("%s: previous block header not found; expected %s", + LogError("%s: previous block header not found; expected %s\n", __func__, expected_block_hash.ToString()); return false; } |