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

Breach arbiter should watch for spends that invalidate justice tx #96

Open
matheusd opened this issue Apr 3, 2020 · 0 comments
Open

Comments

@matheusd
Copy link
Member

matheusd commented Apr 3, 2020

When publishing the justice transaction (

dcrlnd/breacharbiter.go

Lines 572 to 573 in 2975978

err = b.cfg.PublishTransaction(finalTx)
if err != nil {
) if the transaction is successfully published the breach arbiter assumes the transaction will be mined.

However it might be the case that one of the inputs gets double spent making the justice tx invalid. One way this can happen is in SPV mode where the transaction fails to be relayed in time and a different second-level htlc transaction is published.

The breach arbiter should watch for spends of the inputs of the justice transaction and craft a different justice tx even if the original publishing was correct.

Fixing this will allow enabling the "testRevokedCloseRetributionRemoteHodlSecondLevel" test for the SPV backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant