Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/stacks-network/stacks-core
Browse files Browse the repository at this point in the history
… into feat/signer-times-out-end-of-tenure-blocks
  • Loading branch information
jferrant committed Nov 5, 2024
2 parents 0fbe07f + d11ed3c commit 0f2ad94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
9 changes: 4 additions & 5 deletions stackslib/src/net/api/getattachmentsinv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ impl HttpRequest for RPCGetAttachmentsInvRequestHandler {
if key == "index_block_hash" {
index_block_hash = StacksBlockId::from_hex(&value).ok();
} else if key == "pages_indexes" {
if let Ok(pages_indexes_value) = value.parse::<String>() {
for entry in pages_indexes_value.split(',') {
if let Ok(page_index) = entry.parse::<u32>() {
page_indexes.insert(page_index);
}
let pages_indexes_value = value.to_string();
for entry in pages_indexes_value.split(',') {
if let Ok(page_index) = entry.parse::<u32>() {
page_indexes.insert(page_index);
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions testnet/stacks-node/src/nakamoto_node/relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,9 @@ impl RelayerThread {

/// have we waited for the right conditions under which to start mining a block off of our
/// chain tip?
#[allow(clippy::nonminimal_bool)]
#[allow(clippy::eq_op)]
fn has_waited_for_latest_blocks(&self) -> bool {
// a network download pass took place
(self.min_network_download_passes <= self.last_network_download_passes
// a network inv pass took place
&& self.min_network_download_passes <= self.last_network_download_passes)
self.min_network_download_passes <= self.last_network_download_passes
// we waited long enough for a download pass, but timed out waiting
|| self.last_network_block_height_ts + (self.config.node.wait_time_for_blocks as u128) < get_epoch_time_ms()
// we're not supposed to wait at all
Expand Down
6 changes: 1 addition & 5 deletions testnet/stacks-node/src/neon_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2936,13 +2936,9 @@ impl RelayerThread {

/// have we waited for the right conditions under which to start mining a block off of our
/// chain tip?
#[allow(clippy::nonminimal_bool)]
#[allow(clippy::eq_op)]
pub fn has_waited_for_latest_blocks(&self) -> bool {
// a network download pass took place
(self.min_network_download_passes <= self.last_network_download_passes
// a network inv pass took place
&& self.min_network_download_passes <= self.last_network_download_passes)
self.min_network_download_passes <= self.last_network_download_passes
// we waited long enough for a download pass, but timed out waiting
|| self.last_network_block_height_ts + (self.config.node.wait_time_for_blocks as u128) < get_epoch_time_ms()
// we're not supposed to wait at all
Expand Down

0 comments on commit 0f2ad94

Please sign in to comment.