lnwallet: make addHtlc non-LightningChannel method
It has no dependency on LightningChannel
This commit is contained in:
parent
f0019006a7
commit
e2b050aca3
@ -2467,7 +2467,7 @@ func (lc *LightningChannel) createCommitmentTx(c *commitment,
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
err := lc.addHTLC(commitTx, c.isOurs, false, htlc, keyRing)
|
err := addHTLC(commitTx, c.isOurs, false, htlc, keyRing)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -2479,7 +2479,7 @@ func (lc *LightningChannel) createCommitmentTx(c *commitment,
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
err := lc.addHTLC(commitTx, c.isOurs, true, htlc, keyRing)
|
err := addHTLC(commitTx, c.isOurs, true, htlc, keyRing)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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
|
// locate the added HTLC on the commitment transaction from the
|
||||||
// PaymentDescriptor that generated it, the generated script is stored within
|
// PaymentDescriptor that generated it, the generated script is stored within
|
||||||
// the descriptor itself.
|
// the descriptor itself.
|
||||||
func (lc *LightningChannel) addHTLC(commitTx *wire.MsgTx, ourCommit bool,
|
func addHTLC(commitTx *wire.MsgTx, ourCommit bool,
|
||||||
isIncoming bool, paymentDesc *PaymentDescriptor,
|
isIncoming bool, paymentDesc *PaymentDescriptor,
|
||||||
keyRing *CommitmentKeyRing) error {
|
keyRing *CommitmentKeyRing) error {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user