mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 22:46:40 +01:00
lnwallet: make addHtlc non-LightningChannel method
It has no dependency on LightningChannel
This commit is contained in:
parent
f0019006a7
commit
e2b050aca3
1 changed files with 3 additions and 3 deletions
|
@ -2467,7 +2467,7 @@ func (lc *LightningChannel) createCommitmentTx(c *commitment,
|
|||
continue
|
||||
}
|
||||
|
||||
err := lc.addHTLC(commitTx, c.isOurs, false, htlc, keyRing)
|
||||
err := addHTLC(commitTx, c.isOurs, false, htlc, keyRing)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -2479,7 +2479,7 @@ func (lc *LightningChannel) createCommitmentTx(c *commitment,
|
|||
continue
|
||||
}
|
||||
|
||||
err := lc.addHTLC(commitTx, c.isOurs, true, htlc, keyRing)
|
||||
err := addHTLC(commitTx, c.isOurs, true, htlc, keyRing)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -4995,7 +4995,7 @@ func genHtlcScript(isIncoming, ourCommit bool, timeout uint32, rHash [32]byte,
|
|||
// locate the added HTLC on the commitment transaction from the
|
||||
// PaymentDescriptor that generated it, the generated script is stored within
|
||||
// the descriptor itself.
|
||||
func (lc *LightningChannel) addHTLC(commitTx *wire.MsgTx, ourCommit bool,
|
||||
func addHTLC(commitTx *wire.MsgTx, ourCommit bool,
|
||||
isIncoming bool, paymentDesc *PaymentDescriptor,
|
||||
keyRing *CommitmentKeyRing) error {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue