htlcswitch: add resume modified HTLC action to switch

Introduce `ResumeModified` action to resume standard behavior of a p2p
message with optional modifications as specified by the client during
interception.
This commit is contained in:
ffranr
2024-04-13 12:29:52 +01:00
committed by Oliver Gugger
parent 8d1059f41c
commit abca4b8234
4 changed files with 91 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ package lnd
import (
"errors"
"github.com/lightningnetwork/lnd/fn"
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/lnwire"
@@ -51,6 +52,14 @@ func (f *interceptedForward) Resume() error {
return ErrCannotResume
}
// ResumeModified notifies the intention to resume an existing hold forward with
// a modified htlc.
func (f *interceptedForward) ResumeModified(_ fn.Option[lnwire.MilliSatoshi],
_ fn.Option[lnwire.CustomRecords]) error {
return ErrCannotResume
}
// Fail notifies the intention to fail an existing hold forward with an
// encrypted failure reason.
func (f *interceptedForward) Fail(_ []byte) error {