@@ -1471,24 +1471,6 @@ impl Scheduler for SchedulerImpl {
1471
1471
self . purge_expired_ingress_messages ( & mut state) ;
1472
1472
}
1473
1473
1474
- // See documentation around definition of `heap_delta_estimate` for an
1475
- // explanation.
1476
- if state. metadata . heap_delta_estimate >= self . config . subnet_heap_delta_capacity {
1477
- warn ! (
1478
- round_log,
1479
- "At Round {} @ time {}, current heap delta {} exceeds allowed capacity {}, so not executing any messages." ,
1480
- current_round,
1481
- state. time( ) ,
1482
- state. metadata. heap_delta_estimate,
1483
- self . config. subnet_heap_delta_capacity
1484
- ) ;
1485
- self . finish_round ( & mut state, current_round_type) ;
1486
- self . metrics
1487
- . round_skipped_due_to_current_heap_delta_above_limit
1488
- . inc ( ) ;
1489
- return state;
1490
- }
1491
-
1492
1474
// Once the subnet messages are executed in threads, each thread will
1493
1475
// need its own Csprng instance which is initialized with a distinct
1494
1476
// "ExecutionThread". Otherwise, two Csprng instances that are
@@ -1578,6 +1560,23 @@ impl Scheduler for SchedulerImpl {
1578
1560
}
1579
1561
}
1580
1562
scheduler_round_limits. update_subnet_round_limits ( & subnet_round_limits) ;
1563
+
1564
+ // See documentation around definition of `heap_delta_estimate` for an explanation.
1565
+ if state. metadata . heap_delta_estimate >= self . config . subnet_heap_delta_capacity {
1566
+ warn ! (
1567
+ round_log,
1568
+ "At Round {} @ time {}, current heap delta {} exceeds allowed capacity {}, so not executing any messages." ,
1569
+ current_round,
1570
+ state. time( ) ,
1571
+ state. metadata. heap_delta_estimate,
1572
+ self . config. subnet_heap_delta_capacity
1573
+ ) ;
1574
+ self . finish_round ( & mut state, current_round_type) ;
1575
+ self . metrics
1576
+ . round_skipped_due_to_current_heap_delta_above_limit
1577
+ . inc ( ) ;
1578
+ return state;
1579
+ }
1581
1580
}
1582
1581
1583
1582
// Execute postponed `raw_rand` subnet messages.
0 commit comments