contractcourt/success_resolver: remove sweep tx checkpoint

The sweep tx is not actually part of the resolver's encoded data, so the checkpointing was essentially a noop.
This commit is contained in:
Johan T. Halseth 2020-12-09 12:24:03 +01:00
parent 0b84d5f976
commit 7142a302c9
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -228,12 +228,9 @@ func (h *htlcSuccessResolver) resolveRemoteCommitOutput() (
log.Infof("%T(%x): crafted sweep tx=%v", h, log.Infof("%T(%x): crafted sweep tx=%v", h,
h.htlc.RHash[:], spew.Sdump(h.sweepTx)) h.htlc.RHash[:], spew.Sdump(h.sweepTx))
// With the sweep transaction signed, we'll now Checkpoint our // TODO(halseth): should checkpoint sweep tx to DB? Since after
// state. // a restart we might create a different tx, that will conflict
if err := h.Checkpoint(h); err != nil { // with the published one.
log.Errorf("unable to Checkpoint: %v", err)
return nil, err
}
} }
// Regardless of whether an existing transaction was found or newly // Regardless of whether an existing transaction was found or newly