@@ -1186,12 +1186,12 @@ pub fn retrieve_inscribed_satoshi_points_from_block_v3(
1186
1186
1187
1187
let has_transactions_to_process = !transactions_ids. is_empty ( ) || !l1_cache_hits. is_empty ( ) ;
1188
1188
1189
+ let thread_max = hord_config. ingestion_thread_max * 3 ;
1190
+
1189
1191
if has_transactions_to_process {
1190
1192
let expected_traversals = transactions_ids. len ( ) + l1_cache_hits. len ( ) ;
1191
1193
let ( traversal_tx, traversal_rx) = channel ( ) ;
1192
1194
1193
- let thread_max = hord_config. ingestion_thread_max * 3 ;
1194
-
1195
1195
let traversal_data_pool = ThreadPool :: new ( thread_max) ;
1196
1196
let mut tx_thread_pool = vec ! [ ] ;
1197
1197
@@ -1228,7 +1228,7 @@ pub fn retrieve_inscribed_satoshi_points_from_block_v3(
1228
1228
for key in l1_cache_hits. iter ( ) {
1229
1229
if let Some ( entry) = cache_l1. remove ( key) {
1230
1230
let _ = traversal_tx. send ( ( Ok ( entry) , true , thread_index) ) ;
1231
- thread_index = ( thread_index + 1 ) % hord_config . ingestion_thread_max ;
1231
+ thread_index = ( thread_index + 1 ) % thread_max ;
1232
1232
}
1233
1233
}
1234
1234
@@ -1258,10 +1258,10 @@ pub fn retrieve_inscribed_satoshi_points_from_block_v3(
1258
1258
}
1259
1259
1260
1260
// Feed each workers with 2 workitems each
1261
- for thread_index in 0 ..hord_config . ingestion_thread_max {
1261
+ for thread_index in 0 ..thread_max {
1262
1262
let _ = tx_thread_pool[ thread_index] . send ( priority_queue. pop_front ( ) ) ;
1263
1263
}
1264
- for thread_index in 0 ..hord_config . ingestion_thread_max {
1264
+ for thread_index in 0 ..thread_max {
1265
1265
let _ = tx_thread_pool[ thread_index] . send ( priority_queue. pop_front ( ) ) ;
1266
1266
}
1267
1267
@@ -1335,7 +1335,7 @@ pub fn retrieve_inscribed_satoshi_points_from_block_v3(
1335
1335
}
1336
1336
}
1337
1337
}
1338
- for thread_index in 0 ..hord_config . ingestion_thread_max {
1338
+ for thread_index in 0 ..thread_max {
1339
1339
let _ = tx_thread_pool[ thread_index] . send ( None ) ;
1340
1340
}
1341
1341
0 commit comments