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

Improves reorg logic by checking whether we are on sync with the backend or not #235

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Fixes bouncing logic for the dispute
This should be squashed. I just realized about this could actually be simplified.
Leaving like this for an easier review.
sr-gi committed Aug 4, 2023

Verified

This commit was signed with the committer’s verified signature.
sr-gi Sergi Delgado
commit 340ab807b9898dee150e7565d7dfaba3a2d62d29
7 changes: 2 additions & 5 deletions teos/src/responder.rs
Original file line number Diff line number Diff line change
@@ -442,12 +442,9 @@ impl Responder {
dispute_tx.txid()
);
status
} else if status.off_sync() {
// If the dispute bounces because we are off-sync, we want to try again with the whole package. Hence, we leave this as
// reorged.
ConfirmationStatus::ReorgedOut
} else {
// The dispute was accepted, so we can rebroadcast the penalty.
// If the dispute is not rejected we can send the penalty.
// Notice this covers both the dispute being accepted or bouncing, given bouncing will mean it is already on chain.
carrier.send_transaction(&penalty_tx)
}
}