From 7142a302c9eefc9caccc0dbcb8c4fa58a2a0147b Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Wed, 9 Dec 2020 12:24:03 +0100 Subject: [PATCH] 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. --- contractcourt/htlc_success_resolver.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/contractcourt/htlc_success_resolver.go b/contractcourt/htlc_success_resolver.go index 9e48a351..db1706bd 100644 --- a/contractcourt/htlc_success_resolver.go +++ b/contractcourt/htlc_success_resolver.go @@ -228,12 +228,9 @@ func (h *htlcSuccessResolver) resolveRemoteCommitOutput() ( log.Infof("%T(%x): crafted sweep tx=%v", h, h.htlc.RHash[:], spew.Sdump(h.sweepTx)) - // With the sweep transaction signed, we'll now Checkpoint our - // state. - if err := h.Checkpoint(h); err != nil { - log.Errorf("unable to Checkpoint: %v", err) - return nil, err - } + // TODO(halseth): should checkpoint sweep tx to DB? Since after + // a restart we might create a different tx, that will conflict + // with the published one. } // Regardless of whether an existing transaction was found or newly