Skip to content

Commit

Permalink
Merge pull request #4187 from stacks-network/feat/interim-mining
Browse files Browse the repository at this point in the history
Nakamoto-Node: Support for interim block mining
  • Loading branch information
kantai authored Dec 19, 2023
2 parents 8cffc38 + 3cef3b4 commit 2789b18
Show file tree
Hide file tree
Showing 13 changed files with 458 additions and 388 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
- tests::neon_integrations::use_latest_tip_integration_test
- tests::should_succeed_handling_malformed_and_valid_txs
- tests::nakamoto_integrations::simple_neon_integration
- tests::nakamoto_integrations::mine_multiple_per_tenure_integration
steps:
## Setup test environment
- name: Setup Test Environment
Expand Down
1 change: 0 additions & 1 deletion stacks-signer/src/runloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::collections::VecDeque;
use std::sync::mpsc::Sender;
use std::time::Duration;

use backoff::default;
use libsigner::{SignerRunLoop, StackerDBChunksEvent};
use slog::{slog_debug, slog_error, slog_info, slog_warn};
use stacks_common::{debug, error, info, warn};
Expand Down
8 changes: 7 additions & 1 deletion stackslib/src/burnchains/bitcoin/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::convert::TryFrom;
use std::net::Shutdown;
use std::ops::{Deref, DerefMut};
use std::path::PathBuf;
use std::sync::atomic::AtomicBool;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::time::Duration;
use std::{cmp, fs, net, path, time};
Expand Down Expand Up @@ -339,6 +339,12 @@ impl BitcoinIndexer {
let mut initiated = false;

while keep_going {
if let Some(ref should_keep_running) = self.should_keep_running {
if !should_keep_running.load(Ordering::SeqCst) {
return Err(btc_error::TimedOut);
}
}

if do_handshake {
debug!("(Re)establish peer connection");

Expand Down
Loading

0 comments on commit 2789b18

Please sign in to comment.