Skip to content

Commit 35458ac

Browse files
committed
Log HTTP 400 at TRACE instead of ignoring it
.. while it's most often bitcoind already knowing about a transaction already, the error sometimes holds additional information (e.g., not meeting the mempool min).
1 parent cebf11b commit 35458ac

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tx_broadcaster.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,16 @@ where
5656
Err(e) => match e {
5757
esplora_client::Error::Reqwest(err) => {
5858
if err.status() == StatusCode::from_u16(400).ok() {
59-
// Ignore 400, as this just means bitcoind already knows the
59+
// Log 400 at lesser level, as this often just means bitcoind already knows the
6060
// transaction.
6161
// FIXME: We can further differentiate here based on the error
6262
// message which will be available with rust-esplora-client 0.7 and
6363
// later.
64+
log_trace!(
65+
self.logger,
66+
"Failed to broadcast due to HTTP connection error: {}",
67+
err
68+
);
6469
} else {
6570
log_error!(
6671
self.logger,

0 commit comments

Comments
 (0)