Skip to content

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

@matheusd

Description

@matheusd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions