Skip to content
Merged
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
10 changes: 5 additions & 5 deletions src/chain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -991,8 +991,8 @@ impl ChainSource {
);
},
Err(e) => match e {
esplora_client::Error::Reqwest(err) => {
if err.status() == reqwest::StatusCode::from_u16(400).ok() {
esplora_client::Error::HttpResponse { status, message } => {
if status == 400 {
// Log 400 at lesser level, as this often just means bitcoind already knows the
// transaction.
// FIXME: We can further differentiate here based on the error
Expand All @@ -1001,13 +1001,13 @@ impl ChainSource {
log_trace!(
logger,
"Failed to broadcast due to HTTP connection error: {}",
err
message
);
} else {
log_error!(
logger,
"Failed to broadcast due to HTTP connection error: {}",
err
"Failed to broadcast due to HTTP connection error: {} - {}",
status, message
);
}
log_trace!(
Expand Down
Loading