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

lightningnetwork / lnd / 13593508312

28 Feb 2025 05:41PM UTC coverage: 58.287% (-10.4%) from 68.65%
13593508312

Pull #9458

github

web-flow
Merge d40067c0c into f1182e433
Pull Request #9458: multi+server.go: add initial permissions for some peers

346 of 548 new or added lines in 10 files covered. (63.14%)

27412 existing lines in 442 files now uncovered.

94709 of 162488 relevant lines covered (58.29%)

1.81 hits per line

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

0.0
/lnwire/kickoff_sig.go
1
package lnwire
2

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

8
// KickoffSig is the message used to transmit the signature for a kickoff
9
// transaction during the execution phase of a dynamic commitment negotiation
10
// that requires a reanchoring step.
11
type KickoffSig struct {
12
        // ChanID identifies the channel id for which this signature is
13
        // intended.
14
        ChanID ChannelID
15

16
        // Signature contains the ECDSA signature that signs the kickoff
17
        // transaction.
18
        Signature Sig
19

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

26
// A compile time check to ensure that KickoffSig implements the lnwire.Message
27
// interface.
28
var _ Message = (*KickoffSig)(nil)
29

30
// Encode serializes the target KickoffSig into the passed bytes.Buffer
31
// observing the specified protocol version.
32
//
33
// This is part of the lnwire.Message interface.
UNCOV
34
func (ks *KickoffSig) Encode(w *bytes.Buffer, _ uint32) error {
×
UNCOV
35
        if err := WriteChannelID(w, ks.ChanID); err != nil {
×
36
                return err
×
37
        }
×
UNCOV
38
        if err := WriteSig(w, ks.Signature); err != nil {
×
39
                return err
×
40
        }
×
41

UNCOV
42
        return WriteBytes(w, ks.ExtraData)
×
43
}
44

45
// Decode deserializes a serialized KickoffSig message stored in the passed
46
// io.Reader observing the specified protocol version.
47
//
48
// This is part of the lnwire.Message interface.
UNCOV
49
func (ks *KickoffSig) Decode(r io.Reader, _ uint32) error {
×
UNCOV
50
        return ReadElements(r, &ks.ChanID, &ks.Signature, &ks.ExtraData)
×
UNCOV
51
}
×
52

53
// MsgType returns the integer uniquely identifying KickoffSig on the wire.
54
//
55
// This is part of the lnwire.Message interface.
UNCOV
56
func (ks *KickoffSig) MsgType() MessageType { return MsgKickoffSig }
×
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