• 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
/lnwire/closing_sig.go
1
package lnwire
2

3
import (
4
        "bytes"
5
        "io"
6
)
7

8
// ClosingSig is sent in response to a ClosingComplete message. It carries the
9
// signatures of the closee to the closer.
10
type ClosingSig struct {
11
        // ChannelID serves to identify which channel is to be closed.
12
        ChannelID ChannelID
13

14
        // ClosingSigs houses the 3 possible signatures that can be sent.
15
        ClosingSigs
16

17
        // ExtraData is the set of data that was appended to this message to
18
        // fill out the full maximum transport message size. These fields can
19
        // be used to specify optional data such as custom TLV fields.
20
        ExtraData ExtraOpaqueData
21
}
22

23
// Decode deserializes a serialized ClosingSig message stored in the passed
24
// io.Reader.
25
func (c *ClosingSig) Decode(r io.Reader, _ uint32) error {
×
26
        // First, read out all the fields that are hard coded into the message.
×
27
        err := ReadElements(r, &c.ChannelID)
×
28
        if err != nil {
×
29
                return err
×
30
        }
×
31

32
        // With the hard coded messages read, we'll now read out the TLV fields
33
        // of the message.
34
        var tlvRecords ExtraOpaqueData
×
35
        if err := ReadElements(r, &tlvRecords); err != nil {
×
36
                return err
×
37
        }
×
38

39
        if err := decodeClosingSigs(&c.ClosingSigs, tlvRecords); err != nil {
×
40
                return err
×
41
        }
×
42

43
        if len(tlvRecords) != 0 {
×
44
                c.ExtraData = tlvRecords
×
45
        }
×
46

47
        return nil
×
48
}
49

50
// Encode serializes the target ClosingSig into the passed io.Writer.
51
func (c *ClosingSig) Encode(w *bytes.Buffer, _ uint32) error {
×
52
        if err := WriteChannelID(w, c.ChannelID); err != nil {
×
53
                return err
×
54
        }
×
55

56
        recordProducers := closingSigRecords(&c.ClosingSigs)
×
57

×
58
        err := EncodeMessageExtraData(&c.ExtraData, recordProducers...)
×
59
        if err != nil {
×
60
                return err
×
61
        }
×
62

63
        return WriteBytes(w, c.ExtraData)
×
64
}
65

66
// MsgType returns the uint32 code which uniquely identifies this message as a
67
// ClosingSig message on the wire.
68
//
69
// This is part of the lnwire.Message interface.
70
func (c *ClosingSig) MsgType() MessageType {
×
71
        return MsgClosingSig
×
72
}
×
73

74
// A compile time check to ensure ClosingSig implements the lnwire.Message
75
// interface.
76
var _ Message = (*ClosingSig)(nil)
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