• 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

85.19
/lnwire/channel_type.go
1
package lnwire
2

3
import (
4
        "io"
5

6
        "github.com/lightningnetwork/lnd/tlv"
7
)
8

9
const (
10
        // ChannelTypeRecordType is the type of the experimental record used
11
        // to denote which channel type is being negotiated.
12
        ChannelTypeRecordType tlv.Type = 1
13
)
14

15
// ChannelType represents a specific channel type as a set of feature bits that
16
// comprise it.
17
type ChannelType RawFeatureVector
18

19
// featureBitLen returns the length in bytes of the encoded feature bits.
20
func (c ChannelType) featureBitLen() uint64 {
3✔
21
        fv := RawFeatureVector(c)
3✔
22
        return fv.sizeFunc()
3✔
23
}
3✔
24

25
// Record returns a TLV record that can be used to encode/decode the channel
26
// type from a given TLV stream.
27
func (c *ChannelType) Record() tlv.Record {
3✔
28
        return tlv.MakeDynamicRecord(
3✔
29
                ChannelTypeRecordType, c, c.featureBitLen, channelTypeEncoder,
3✔
30
                channelTypeDecoder,
3✔
31
        )
3✔
32
}
3✔
33

34
// channelTypeEncoder is a custom TLV encoder for the ChannelType record.
35
func channelTypeEncoder(w io.Writer, val interface{}, buf *[8]byte) error {
3✔
36
        if v, ok := val.(*ChannelType); ok {
6✔
37
                fv := RawFeatureVector(*v)
3✔
38
                return rawFeatureEncoder(w, &fv, buf)
3✔
39
        }
3✔
40

41
        return tlv.NewTypeForEncodingErr(val, "*lnwire.ChannelType")
×
42
}
43

44
// channelTypeDecoder is a custom TLV decoder for the ChannelType record.
45
func channelTypeDecoder(r io.Reader, val interface{}, buf *[8]byte,
46
        l uint64) error {
3✔
47

3✔
48
        if v, ok := val.(*ChannelType); ok {
6✔
49
                fv := NewRawFeatureVector()
3✔
50

3✔
51
                if err := rawFeatureDecoder(r, fv, buf, l); err != nil {
3✔
52
                        return err
×
53
                }
×
54

55
                *v = ChannelType(*fv)
3✔
56
                return nil
3✔
57
        }
58

59
        return tlv.NewTypeForEncodingErr(val, "*lnwire.ChannelType")
×
60
}
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