@@ -107,7 +107,8 @@ void BaseIndex::ThreadSync()
107
107
108
108
int64_t current_time = GetTime ();
109
109
if (last_log_time + SYNC_LOG_INTERVAL < current_time) {
110
- LogPrintf (" Syncing txindex with block chain from height %d\n " , pindex->nHeight );
110
+ LogPrintf (" Syncing %s with block chain from height %d\n " ,
111
+ GetName (), pindex->nHeight );
111
112
last_log_time = current_time;
112
113
}
113
114
@@ -123,17 +124,17 @@ void BaseIndex::ThreadSync()
123
124
return ;
124
125
}
125
126
if (!WriteBlock (block, pindex)) {
126
- FatalError (" %s: Failed to write block %s to tx index database" ,
127
+ FatalError (" %s: Failed to write block %s to index database" ,
127
128
__func__, pindex->GetBlockHash ().ToString ());
128
129
return ;
129
130
}
130
131
}
131
132
}
132
133
133
134
if (pindex) {
134
- LogPrintf (" txindex is enabled at height %d\n " , pindex->nHeight );
135
+ LogPrintf (" %s is enabled at height %d\n " , GetName () , pindex->nHeight );
135
136
} else {
136
- LogPrintf (" txindex is enabled\n " );
137
+ LogPrintf (" %s is enabled\n " , GetName () );
137
138
}
138
139
}
139
140
@@ -182,7 +183,7 @@ void BaseIndex::BlockConnected(const std::shared_ptr<const CBlock>& block, const
182
183
// new chain tip. In this unlikely event, log a warning and let the queue clear.
183
184
if (best_block_index->GetAncestor (pindex->nHeight - 1 ) != pindex->pprev ) {
184
185
LogPrintf (" %s: WARNING: Block %s does not connect to an ancestor of " /* Continued */
185
- " known best chain (tip=%s); not updating txindex \n " ,
186
+ " known best chain (tip=%s); not updating index \n " ,
186
187
__func__, pindex->GetBlockHash ().ToString (),
187
188
best_block_index->GetBlockHash ().ToString ());
188
189
return ;
@@ -192,7 +193,7 @@ void BaseIndex::BlockConnected(const std::shared_ptr<const CBlock>& block, const
192
193
if (WriteBlock (*block, pindex)) {
193
194
m_best_block_index = pindex;
194
195
} else {
195
- FatalError (" %s: Failed to write block %s to txindex " ,
196
+ FatalError (" %s: Failed to write block %s to index " ,
196
197
__func__, pindex->GetBlockHash ().ToString ());
197
198
return ;
198
199
}
@@ -225,7 +226,7 @@ void BaseIndex::ChainStateFlushed(const CBlockLocator& locator)
225
226
const CBlockIndex* best_block_index = m_best_block_index.load ();
226
227
if (best_block_index->GetAncestor (locator_tip_index->nHeight ) != locator_tip_index) {
227
228
LogPrintf (" %s: WARNING: Locator contains block (hash=%s) not on known best " /* Continued */
228
- " chain (tip=%s); not writing txindex locator\n " ,
229
+ " chain (tip=%s); not writing index locator\n " ,
229
230
__func__, locator_tip_hash.ToString (),
230
231
best_block_index->GetBlockHash ().ToString ());
231
232
return ;
@@ -255,7 +256,7 @@ bool BaseIndex::BlockUntilSyncedToCurrentChain()
255
256
}
256
257
}
257
258
258
- LogPrintf (" %s: txindex is catching up on block notifications\n " , __func__);
259
+ LogPrintf (" %s: %s is catching up on block notifications\n " , __func__, GetName () );
259
260
SyncWithValidationInterfaceQueue ();
260
261
return true ;
261
262
}
@@ -299,11 +300,11 @@ void BaseIndex::Start()
299
300
// callbacks are not missed if Init sets m_synced to true.
300
301
RegisterValidationInterface (this );
301
302
if (!Init ()) {
302
- FatalError (" %s: txindex failed to initialize" , __func__);
303
+ FatalError (" %s: %s failed to initialize" , __func__, GetName () );
303
304
return ;
304
305
}
305
306
306
- m_thread_sync = std::thread (&TraceThread<std::function<void ()>>, " txindex " ,
307
+ m_thread_sync = std::thread (&TraceThread<std::function<void ()>>, GetName () ,
307
308
std::bind (&BaseIndex::ThreadSync, this ));
308
309
}
309
310
0 commit comments