@@ -30,7 +30,7 @@ constexpr auto SYNC_LOG_INTERVAL{30s};
30
30
constexpr auto SYNC_LOCATOR_WRITE_INTERVAL{30s};
31
31
32
32
template <typename ... Args>
33
- static void FatalError (const char * fmt, const Args&... args)
33
+ static void FatalErrorf (const char * fmt, const Args&... args)
34
34
{
35
35
AbortNode (tfm::format (fmt, args...));
36
36
}
@@ -197,7 +197,7 @@ void BaseIndex::ThreadSync()
197
197
break ;
198
198
}
199
199
if (pindex_next->pprev != pindex && !Rewind (pindex, pindex_next->pprev )) {
200
- FatalError (" %s: Failed to rewind index %s to a previous chain tip" ,
200
+ FatalErrorf (" %s: Failed to rewind index %s to a previous chain tip" ,
201
201
__func__, GetName ());
202
202
return ;
203
203
}
@@ -221,14 +221,14 @@ void BaseIndex::ThreadSync()
221
221
CBlock block;
222
222
interfaces::BlockInfo block_info = kernel::MakeBlockInfo (pindex);
223
223
if (!m_chainstate->m_blockman .ReadBlockFromDisk (block, *pindex)) {
224
- FatalError (" %s: Failed to read block %s from disk" ,
224
+ FatalErrorf (" %s: Failed to read block %s from disk" ,
225
225
__func__, pindex->GetBlockHash ().ToString ());
226
226
return ;
227
227
} else {
228
228
block_info.data = █
229
229
}
230
230
if (!CustomAppend (block_info)) {
231
- FatalError (" %s: Failed to write block %s to index database" ,
231
+ FatalErrorf (" %s: Failed to write block %s to index database" ,
232
232
__func__, pindex->GetBlockHash ().ToString ());
233
233
return ;
234
234
}
@@ -294,7 +294,7 @@ void BaseIndex::BlockConnected(const std::shared_ptr<const CBlock>& block, const
294
294
const CBlockIndex* best_block_index = m_best_block_index.load ();
295
295
if (!best_block_index) {
296
296
if (pindex->nHeight != 0 ) {
297
- FatalError (" %s: First block connected is not the genesis block (height=%d)" ,
297
+ FatalErrorf (" %s: First block connected is not the genesis block (height=%d)" ,
298
298
__func__, pindex->nHeight );
299
299
return ;
300
300
}
@@ -312,7 +312,7 @@ void BaseIndex::BlockConnected(const std::shared_ptr<const CBlock>& block, const
312
312
return ;
313
313
}
314
314
if (best_block_index != pindex->pprev && !Rewind (best_block_index, pindex->pprev )) {
315
- FatalError (" %s: Failed to rewind index %s to a previous chain tip" ,
315
+ FatalErrorf (" %s: Failed to rewind index %s to a previous chain tip" ,
316
316
__func__, GetName ());
317
317
return ;
318
318
}
@@ -325,7 +325,7 @@ void BaseIndex::BlockConnected(const std::shared_ptr<const CBlock>& block, const
325
325
// processed, and the index object being safe to delete.
326
326
SetBestBlockIndex (pindex);
327
327
} else {
328
- FatalError (" %s: Failed to write block %s to index" ,
328
+ FatalErrorf (" %s: Failed to write block %s to index" ,
329
329
__func__, pindex->GetBlockHash ().ToString ());
330
330
return ;
331
331
}
@@ -345,7 +345,7 @@ void BaseIndex::ChainStateFlushed(const CBlockLocator& locator)
345
345
}
346
346
347
347
if (!locator_tip_index) {
348
- FatalError (" %s: First block (hash=%s) in locator was not found" ,
348
+ FatalErrorf (" %s: First block (hash=%s) in locator was not found" ,
349
349
__func__, locator_tip_hash.ToString ());
350
350
return ;
351
351
}
0 commit comments