Skip to content

Commit 13381ca

Browse files
committed
add comments
1 parent 6cb5976 commit 13381ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stackslib/src/net/download/nakamoto/download_state_machine.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ impl NakamotoDownloadStateMachine {
678678
neighbors: &[NeighborAddress],
679679
) -> Option<u64> {
680680
match self.state {
681+
// Still in IBD mode, so we can only get the max height from the confirmed tenure downloads
681682
NakamotoDownloadState::Confirmed => self
682683
.tenure_downloads
683684
.downloaders
@@ -690,6 +691,7 @@ impl NakamotoDownloadStateMachine {
690691
.map(|end_block| end_block.header.chain_length + 1)
691692
})
692693
.max(),
694+
// In steady-state mode, we can get the max height from the unconfirmed tenure downloads
693695
NakamotoDownloadState::Unconfirmed => neighbors
694696
.iter()
695697
.filter_map(|neighbor_addr| {

0 commit comments

Comments
 (0)