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

3
import (
4
        "io"
5
)
6

7
// AnnounceSignatures is a direct message between two endpoints of a
8
// channel and serves as an opt-in mechanism to allow the announcement of
9
// the channel to the rest of the network. It contains the necessary
10
// signatures by the sender to construct the channel announcement message.
11
type AnnounceSignatures struct {
12
        // ChannelID is the unique description of the funding transaction.
13
        // Channel id is better for users and debugging and short channel id is
14
        // used for quick test on existence of the particular utxo inside the
15
        // block chain, because it contains information about block.
16
        ChannelID ChannelID
17

18
        // ShortChannelID is the unique description of the funding
19
        // transaction. It is constructed with the most significant 3 bytes
20
        // as the block height, the next 3 bytes indicating the transaction
21
        // index within the block, and the least significant two bytes
22
        // indicating the output index which pays to the channel.
23
        ShortChannelID ShortChannelID
24

25
        // NodeSignature is the signature which contains the signed announce
26
        // channel message, by this signature we proof that we possess of the
27
        // node pub key and creating the reference node_key -> bitcoin_key.
28
        NodeSignature Sig
29

30
        // BitcoinSignature is the signature which contains the signed node
31
        // public key, by this signature we proof that we possess of the
32
        // bitcoin key and and creating the reverse reference bitcoin_key ->
33
        // node_key.
34
        BitcoinSignature Sig
35

36
        // ExtraOpaqueData is the set of data that was appended to this
37
        // message, some of which we may not actually know how to iterate or
38
        // parse. By holding onto this data, we ensure that we're able to
39
        // properly validate the set of signatures that cover these new fields,
40
        // and ensure we're able to make upgrades to the network in a forwards
41
        // compatible manner.
42
        ExtraOpaqueData []byte
43
}
44

45
// A compile time check to ensure AnnounceSignatures implements the
46
// lnwire.Message interface.
47
var _ Message = (*AnnounceSignatures)(nil)
48

49
// Decode deserializes a serialized AnnounceSignatures stored in the passed
50
// io.Reader observing the specified protocol version.
51
//
52
// This is part of the lnwire.Message interface.
53
func (a *AnnounceSignatures) Decode(r io.Reader, pver uint32) error {
×
54
        err := ReadElements(r,
×
55
                &a.ChannelID,
×
56
                &a.ShortChannelID,
×
57
                &a.NodeSignature,
×
58
                &a.BitcoinSignature,
×
59
        )
×
60
        if err != nil {
×
61
                return err
×
62
        }
×
63

64
        // Now that we've read out all the fields that we explicitly know of,
65
        // we'll collect the remainder into the ExtraOpaqueData field. If there
66
        // aren't any bytes, then we'll snip off the slice to avoid carrying
67
        // around excess capacity.
68
        a.ExtraOpaqueData, err = io.ReadAll(r)
×
69
        if err != nil {
×
70
                return err
×
71
        }
×
72
        if len(a.ExtraOpaqueData) == 0 {
×
73
                a.ExtraOpaqueData = nil
×
74
        }
×
75

76
        return nil
×
77
}
78

79
// Encode serializes the target AnnounceSignatures into the passed io.Writer
80
// observing the protocol version specified.
81
//
82
// This is part of the lnwire.Message interface.
83
func (a *AnnounceSignatures) Encode(w io.Writer, pver uint32) error {
×
84
        return WriteElements(w,
×
85
                a.ChannelID,
×
86
                a.ShortChannelID,
×
87
                a.NodeSignature,
×
88
                a.BitcoinSignature,
×
89
                a.ExtraOpaqueData,
×
90
        )
×
91
}
×
92

93
// MsgType returns the integer uniquely identifying this message type on the
94
// wire.
95
//
96
// This is part of the lnwire.Message interface.
97
func (a *AnnounceSignatures) MsgType() MessageType {
×
98
        return MsgAnnounceSignatures
×
99
}
×
100

101
// MaxPayloadLength returns the maximum allowed payload size for this message
102
// observing the specified protocol version.
103
//
104
// This is part of the lnwire.Message interface.
105
func (a *AnnounceSignatures) MaxPayloadLength(pver uint32) uint32 {
×
106
        return 65533
×
107
}
×
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