Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions node/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1284,9 +1284,10 @@ struct PublisherHealthResponse {
/// Esplora-side error is intentional: the operator should see the
/// failure mode, not a fabricated empty response.
async fn publisher_health_handler(State(state): State<AppState>) -> impl IntoResponse {
let publisher_address = &*crate::PUBLISHER_ADDRESS;
let publisher_address = crate::PUBLISHER_ADDRESS.clone();

match crate::publisher::get_publisher_utxo(publisher_address, &state.esplora_config, None).await
match crate::publisher::get_publisher_utxo(&publisher_address, &state.esplora_config, None)
.await
{
Ok(utxos) => {
let utxo_count = utxos.len() as u64;
Expand Down
15 changes: 13 additions & 2 deletions node/src/router_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4506,7 +4506,14 @@ async fn mint_handler_concurrent_mint_during_proof_returns_503() {
// by this point because it runs BEFORE phase 2 in `mint_handler`.
// This is a hard happens-before edge: the bump below cannot run
// until the handler is observably past the phase-1 snapshot.
notified.as_mut().await;
// Defensive timeouts: if a regression skips notify_one(), the test
// would otherwise hang for the full 120-min CI job budget. 30 s is
// >>> prepare_mint typical runtime (~200ms in the test build).
tokio::time::timeout(std::time::Duration::from_secs(30), notified.as_mut())
.await
.expect(
"phase2_reached notify must fire within 30s — regression in mint_handler phase 2 entry",
);

// Now bump num_pubkeys on the minting_account. Phase 1 already
// captured expected_num_pubkeys = 0, so any non-zero value here
Expand All @@ -4518,7 +4525,11 @@ async fn mint_handler_concurrent_mint_during_proof_returns_503() {
minting.num_pubkeys = 1;
}

let (status, resp_body) = request_task.await.expect("request task panicked");
let (status, resp_body) =
tokio::time::timeout(std::time::Duration::from_secs(60), request_task)
.await
.expect("mint request must complete within 60s")
.expect("request task panicked");

assert_eq!(
status,
Expand Down
Loading