• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 13035292482

29 Jan 2025 03:59PM UTC coverage: 49.3% (-9.5%) from 58.777%
13035292482

Pull #9456

github

mohamedawnallah
docs: update release-notes-0.19.0.md

In this commit, we warn users about the removal
of RPCs `SendToRoute`, `SendToRouteSync`, `SendPayment`,
and `SendPaymentSync` in the next release 0.20.
Pull Request #9456: lnrpc+docs: deprecate warning `SendToRoute`, `SendToRouteSync`, `SendPayment`, and `SendPaymentSync` in Release 0.19

100634 of 204126 relevant lines covered (49.3%)

1.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/channeldb/migration/lnwire21/update_fail_htlc.go
1
package lnwire
2

3
import (
4
        "io"
5
)
6

7
// OpaqueReason is an opaque encrypted byte slice that encodes the exact
8
// failure reason and additional some supplemental data. The contents of this
9
// slice can only be decrypted by the sender of the original HTLC.
10
type OpaqueReason []byte
11

12
// UpdateFailHTLC is sent by Alice to Bob in order to remove a previously added
13
// HTLC. Upon receipt of an UpdateFailHTLC the HTLC should be removed from the
14
// next commitment transaction, with the UpdateFailHTLC propagated backwards in
15
// the route to fully undo the HTLC.
16
type UpdateFailHTLC struct {
17
        // ChanID is the particular active channel that this
18
        // UpdateFailHTLC is bound to.
19
        ChanID ChannelID
20

21
        // ID references which HTLC on the remote node's commitment transaction
22
        // has timed out.
23
        ID uint64
24

25
        // Reason is an onion-encrypted blob that details why the HTLC was
26
        // failed. This blob is only fully decryptable by the initiator of the
27
        // HTLC message.
28
        Reason OpaqueReason
29
}
30

31
// A compile time check to ensure UpdateFailHTLC implements the lnwire.Message
32
// interface.
33
var _ Message = (*UpdateFailHTLC)(nil)
34

35
// Decode deserializes a serialized UpdateFailHTLC message stored in the passed
36
// io.Reader observing the specified protocol version.
37
//
38
// This is part of the lnwire.Message interface.
39
func (c *UpdateFailHTLC) Decode(r io.Reader, pver uint32) error {
×
40
        return ReadElements(r,
×
41
                &c.ChanID,
×
42
                &c.ID,
×
43
                &c.Reason,
×
44
        )
×
45
}
×
46

47
// Encode serializes the target UpdateFailHTLC into the passed io.Writer observing
48
// the protocol version specified.
49
//
50
// This is part of the lnwire.Message interface.
51
func (c *UpdateFailHTLC) Encode(w io.Writer, pver uint32) error {
×
52
        return WriteElements(w,
×
53
                c.ChanID,
×
54
                c.ID,
×
55
                c.Reason,
×
56
        )
×
57
}
×
58

59
// MsgType returns the integer uniquely identifying this message type on the
60
// wire.
61
//
62
// This is part of the lnwire.Message interface.
63
func (c *UpdateFailHTLC) MsgType() MessageType {
×
64
        return MsgUpdateFailHTLC
×
65
}
×
66

67
// MaxPayloadLength returns the maximum allowed payload size for an UpdateFailHTLC
68
// complete message observing the specified protocol version.
69
//
70
// This is part of the lnwire.Message interface.
71
func (c *UpdateFailHTLC) MaxPayloadLength(uint32) uint32 {
×
72
        var length uint32
×
73

×
74
        // Length of the ChanID
×
75
        length += 32
×
76

×
77
        // Length of the ID
×
78
        length += 8
×
79

×
80
        // Length of the length opaque reason
×
81
        length += 2
×
82

×
83
        // Length of the Reason
×
84
        length += 292
×
85

×
86
        return length
×
87
}
×
88

89
// TargetChanID returns the channel id of the link for which this message is
90
// intended.
91
//
92
// NOTE: Part of peer.LinkUpdater interface.
93
func (c *UpdateFailHTLC) TargetChanID() ChannelID {
×
94
        return c.ChanID
×
95
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc