lnwire: add blinding point to update_add_htlc TLVs
Add blinding points to update_add_htlc. This TLV will be set for nodes that are relaying payments in blinded routes that are _not_ the introduction node.
This commit is contained in:
5 files changed
+111
-17
No files matched your search
+14
-2
@@ -45,6 +45,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/queue"
|
||||
"github.com/lightningnetwork/lnd/subscribe"
|
||||
"github.com/lightningnetwork/lnd/ticker"
|
||||
"github.com/lightningnetwork/lnd/tlv"
|
||||
"github.com/lightningnetwork/lnd/watchtower/wtclient"
|
||||
)
|
||||
|
||||
@@ -1985,8 +1986,19 @@ func messageSummary(msg lnwire.Message) string {
|
||||
msg.FeeSatoshis)
|
||||
|
||||
case *lnwire.UpdateAddHTLC:
|
||||
return fmt.Sprintf("chan_id=%v, id=%v, amt=%v, expiry=%v, hash=%x",
|
||||
msg.ChanID, msg.ID, msg.Amount, msg.Expiry, msg.PaymentHash[:])
|
||||
var blindingPoint []byte
|
||||
msg.BlindingPoint.WhenSome(
|
||||
func(b tlv.RecordT[lnwire.BlindingPointTlvType,
|
||||
*btcec.PublicKey]) {
|
||||
|
||||
blindingPoint = b.Val.SerializeCompressed()
|
||||
},
|
||||
)
|
||||
|
||||
return fmt.Sprintf("chan_id=%v, id=%v, amt=%v, expiry=%v, "+
|
||||
"hash=%x, blinding_point=%x", msg.ChanID, msg.ID,
|
||||
msg.Amount, msg.Expiry, msg.PaymentHash[:],
|
||||
blindingPoint)
|
||||
|
||||
case *lnwire.UpdateFailHTLC:
|
||||
return fmt.Sprintf("chan_id=%v, id=%v, reason=%x", msg.ChanID,
|
||||
|
||||
Reference in new issue
Block a user