input+lnwallet: refactor select methods in input to use ChannelParty

This commit is contained in:
Keagan McClelland committed 2024-07-31 14:50:26 -07:00
1 parent 1a5b5c5f62
commit 3a15085014
4 files changed
+22 -18

No files matched your search

+4 -4
View File
@@ -1095,7 +1095,7 @@ func genTaprootHtlcScript(isIncoming, ourCommit bool, timeout uint32,
case isIncoming && ourCommit:
htlcScriptTree, err = input.ReceiverHTLCScriptTaproot(
timeout, keyRing.RemoteHtlcKey, keyRing.LocalHtlcKey,
keyRing.RevocationKey, rHash[:], ourCommit,
keyRing.RevocationKey, rHash[:], lntypes.Local,
)
// We're being paid via an HTLC by the remote party, and the HTLC is
@@ -1104,7 +1104,7 @@ func genTaprootHtlcScript(isIncoming, ourCommit bool, timeout uint32,
case isIncoming && !ourCommit:
htlcScriptTree, err = input.SenderHTLCScriptTaproot(
keyRing.RemoteHtlcKey, keyRing.LocalHtlcKey,
keyRing.RevocationKey, rHash[:], ourCommit,
keyRing.RevocationKey, rHash[:], lntypes.Remote,
)
// We're sending an HTLC which is being added to our commitment
@@ -1113,7 +1113,7 @@ func genTaprootHtlcScript(isIncoming, ourCommit bool, timeout uint32,
case !isIncoming && ourCommit:
htlcScriptTree, err = input.SenderHTLCScriptTaproot(
keyRing.LocalHtlcKey, keyRing.RemoteHtlcKey,
keyRing.RevocationKey, rHash[:], ourCommit,
keyRing.RevocationKey, rHash[:], lntypes.Local,
)
// Finally, we're paying the remote party via an HTLC, which is being
@@ -1122,7 +1122,7 @@ func genTaprootHtlcScript(isIncoming, ourCommit bool, timeout uint32,
case !isIncoming && !ourCommit:
htlcScriptTree, err = input.ReceiverHTLCScriptTaproot(
timeout, keyRing.LocalHtlcKey, keyRing.RemoteHtlcKey,
keyRing.RevocationKey, rHash[:], ourCommit,
keyRing.RevocationKey, rHash[:], lntypes.Remote,
)
}