Skip to content

Commit

Permalink
node: Use default round_base_timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
goshawk authored and goshawk-3 committed Jan 5, 2024
1 parent 5c46297 commit b40d646
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions node/src/chain/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use tokio::task::JoinHandle;
use tracing::{error, info, trace, warn};

use std::sync::Arc;
use std::time::Duration;

/// Consensus Service Task is responsible for running the consensus layer.
///
Expand Down Expand Up @@ -86,10 +87,13 @@ impl Task {
Arc::new(Mutex::new(CandidateDB::new(db.clone(), network.clone()))),
);

let round_base_timeout = self.adjust_round_base_timeout(db);

let ru = RoundUpdate::new(
self.keys.1.clone(),
self.keys.0,
most_recent_block,
round_base_timeout,
);

self.task_id += 1;
Expand Down Expand Up @@ -142,6 +146,14 @@ impl Task {
};
}
}

/// TBD
fn adjust_round_base_timeout<D: database::DB>(
&mut self,
_db: &Arc<RwLock<D>>,
) -> Duration {
dusk_consensus::config::ROUND_BASE_TIMEOUT
}
}

#[derive(Debug, Default)]
Expand Down
2 changes: 1 addition & 1 deletion node/testbed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ do
#delay=$(($i))
#sleep 20

run_node "$BOOTSTRAP_ADDR" "127.0.0.1:$PORT" "info" "$DUSK_WALLET_DIR" "$i" "$TEMPD" "127.0.0.1:$WS_PORT" &
run_node "$BOOTSTRAP_ADDR" "127.0.0.1:$PORT" "debug" "$DUSK_WALLET_DIR" "$i" "$TEMPD" "127.0.0.1:$WS_PORT" &

# wait for bootstrappers
# TODO
Expand Down

0 comments on commit b40d646

Please sign in to comment.