@@ -458,15 +458,11 @@ impl FinalizedState {
458
458
let block_time = block. header . time . timestamp ( ) ;
459
459
let local_time = chrono:: Utc :: now ( ) . timestamp ( ) ;
460
460
461
- // Mainnet bulk size is small enough to avoid the elasticsearch 100mb content
462
- // length limitation. MAX_BLOCK_BYTES = 2MB but each block use around 4.1 MB of JSON.
461
+ // Bulk size is small enough to avoid the elasticsearch 100mb content length limitation.
462
+ // MAX_BLOCK_BYTES = 2MB but each block use around 4.1 MB of JSON.
463
463
// Each block count as 2 as we send them with a operation/header line. A value of 48
464
464
// is 24 blocks.
465
- const MAINNET_AWAY_FROM_TIP_BULK_SIZE : usize = 48 ;
466
-
467
- // Testnet bulk size is larger as blocks are generally smaller in the testnet.
468
- // A value of 800 is 400 blocks as we are not counting the operation line.
469
- const TESTNET_AWAY_FROM_TIP_BULK_SIZE : usize = 800 ;
465
+ const AWAY_FROM_TIP_BULK_SIZE : usize = 48 ;
470
466
471
467
// The number of blocks the bulk will have when we are in sync.
472
468
// A value of 2 means only 1 block as we want to insert them as soon as we get
@@ -477,10 +473,7 @@ impl FinalizedState {
477
473
// less than this number of seconds.
478
474
const CLOSE_TO_TIP_SECONDS : i64 = 14400 ; // 4 hours
479
475
480
- let mut blocks_size_to_dump = match self . network ( ) {
481
- Network :: Mainnet => MAINNET_AWAY_FROM_TIP_BULK_SIZE ,
482
- Network :: Testnet => TESTNET_AWAY_FROM_TIP_BULK_SIZE ,
483
- } ;
476
+ let mut blocks_size_to_dump = AWAY_FROM_TIP_BULK_SIZE ;
484
477
485
478
// If we are close to the tip, index one block per bulk call.
486
479
if local_time - block_time < CLOSE_TO_TIP_SECONDS {
0 commit comments