You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: testnet/stacks-node/src/run_loop/neon.rs
+4-44Lines changed: 4 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -1156,19 +1156,8 @@ impl RunLoop {
1156
1156
1157
1157
letmut sortition_db_height = rc_aligned_height;
1158
1158
letmut burnchain_height = sortition_db_height;
1159
-
letmut num_sortitions_in_last_cycle = 1;
1160
1159
1161
1160
// prepare to fetch the first reward cycle!
1162
-
letmut target_burnchain_block_height = cmp::min(
1163
-
burnchain_config.reward_cycle_to_block_height(
1164
-
burnchain_config
1165
-
.block_height_to_reward_cycle(burnchain_height)
1166
-
.expect("BUG: block height is not in a reward cycle")
1167
-
+ 1,
1168
-
),
1169
-
burnchain.get_headers_height() - 1,
1170
-
);
1171
-
1172
1161
debug!("Runloop: Begin main runloop starting a burnchain block {sortition_db_height}");
1173
1162
1174
1163
letmut last_tenure_sortition_height = 0;
@@ -1196,17 +1185,13 @@ impl RunLoop {
1196
1185
1197
1186
let remote_chain_height = burnchain.get_headers_height() - 1;
1198
1187
1199
-
// wait for the p2p state-machine to do at least one pass
1200
-
debug!("Runloop: Wait until Stacks block downloads reach a quiescent state before processing more burnchain blocks";"remote_chain_height" => remote_chain_height,"local_chain_height" => burnchain_height);
1201
-
1202
-
// wait until it's okay to process the next reward cycle's sortitions
1203
-
let ibd = matchself.get_pox_watchdog().pox_sync_wait(
1188
+
// wait until it's okay to process the next reward cycle's sortitions.
"Failed to find block in fork processed by burnchain indexer",
1290
1270
)
1291
1271
};
1292
-
if block.sortition{
1293
-
sort_count += 1;
1294
-
}
1295
1272
1296
1273
let sortition_id = &block.sortition_id;
1297
1274
@@ -1338,9 +1315,8 @@ impl RunLoop {
1338
1315
debug!("Runloop: enable miner after processing sortitions");
1339
1316
signal_mining_ready(globals.get_miner_status());
1340
1317
1341
-
num_sortitions_in_last_cycle = sort_count;
1342
1318
debug!(
1343
-
"Runloop: Synchronized sortitions up to block height {next_sortition_height} from {sortition_db_height} (chain tip height is {burnchain_height}); {num_sortitions_in_last_cycle} sortitions"
1319
+
"Runloop: Synchronized sortitions up to block height {next_sortition_height} from {sortition_db_height} (chain tip height is {burnchain_height})"
1344
1320
);
1345
1321
1346
1322
sortition_db_height = next_sortition_height;
@@ -1359,22 +1335,6 @@ impl RunLoop {
1359
1335
}
1360
1336
}
1361
1337
1362
-
// advance one reward cycle at a time.
1363
-
// If we're still downloading, then this is simply target_burnchain_block_height + reward_cycle_len.
1364
-
// Otherwise, this is burnchain_tip + reward_cycle_len
1365
-
let next_target_burnchain_block_height = cmp::min(
0 commit comments