pusher: optional IPv6 preference for welist reports + log report failures #1

Merged
svatantrya merged 2 commits from SAFE21.io/bal-server:fix/pusher-welist-ipv6-preference into main 2026-07-19 15:09:00 +00:00
Showing only changes of commit 7fe5fd3139 - Show all commits

View File

@@ -333,8 +333,14 @@ async fn main_result(cfg: &MyConfig, network_params: &NetworkParams) -> Result<(
stmt.bind((2, Value::String(txid.clone()))).unwrap(); stmt.bind((2, Value::String(txid.clone()))).unwrap();
let _ = stmt.next(); let _ = stmt.next();
} }
let _ = send_stats_report(cfg, bcinfo).await; if let Err(e) = send_stats_report(cfg, bcinfo).await {
let _ = calculate_stats(&db, network_params.db_field.clone()).await; // Never discard silently: a failing report is otherwise
// invisible in the logs and can go unnoticed for a long time.
warn!("send_stats_report failed: {e}");
}
if let Err(e) = calculate_stats(&db, network_params.db_field.clone()).await {
warn!("calculate_stats failed: {e}");
}
} }
Err(erx) => { Err(erx) => {
error!("impossible to get client: {}, retrying on next block", erx); error!("impossible to get client: {}, retrying on next block", erx);