Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect logging during RBF or rebroadcast #3482

Merged
merged 1 commit into from
Dec 12, 2024
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
8 changes: 4 additions & 4 deletions lightning/src/chain/onchaintx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,23 +502,23 @@ impl<ChannelSigner: EcdsaChannelSigner> OnchainTxHandler<ChannelSigner> {
for (claim_id, request) in bump_requests {
self.generate_claim(current_height, &request, &feerate_strategy, conf_target, fee_estimator, logger)
.map(|(_, new_feerate, claim)| {
let mut bumped_feerate = false;
let mut feerate_was_bumped = false;
if let Some(mut_request) = self.pending_claim_requests.get_mut(&claim_id) {
bumped_feerate = request.previous_feerate() > new_feerate;
feerate_was_bumped = new_feerate > request.previous_feerate();
mut_request.set_feerate(new_feerate);
}
match claim {
OnchainClaim::Tx(tx) => {
if tx.is_fully_signed() {
let log_start = if bumped_feerate { "Broadcasting RBF-bumped" } else { "Rebroadcasting" };
let log_start = if feerate_was_bumped { "Broadcasting RBF-bumped" } else { "Rebroadcasting" };
log_info!(logger, "{} onchain {}", log_start, log_tx!(tx.0));
broadcaster.broadcast_transactions(&[&tx.0]);
} else {
log_info!(logger, "Waiting for signature of unsigned onchain transaction {}", tx.0.compute_txid());
}
},
OnchainClaim::Event(event) => {
let log_start = if bumped_feerate { "Yielding fee-bumped" } else { "Replaying" };
let log_start = if feerate_was_bumped { "Yielding fee-bumped" } else { "Replaying" };
log_info!(logger, "{} onchain event to spend inputs {:?}", log_start,
request.outpoints());
#[cfg(debug_assertions)] {
Expand Down
Loading