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

lightningnetwork / lnd / 13566028875

27 Feb 2025 12:09PM UTC coverage: 49.396% (-9.4%) from 58.748%
13566028875

Pull #9555

github

ellemouton
graph/db: populate the graph cache in Start instead of during construction

In this commit, we move the graph cache population logic out of the
ChannelGraph constructor and into its Start method instead.
Pull Request #9555: graph: extract cache from CRUD [6]

34 of 54 new or added lines in 4 files covered. (62.96%)

27464 existing lines in 436 files now uncovered.

101095 of 204664 relevant lines covered (49.4%)

1.54 hits per line

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

70.0
/netann/sign.go
1
package netann
2

3
import (
4
        "fmt"
5

6
        "github.com/lightningnetwork/lnd/input"
7
        "github.com/lightningnetwork/lnd/keychain"
8
        "github.com/lightningnetwork/lnd/lnwallet"
9
        "github.com/lightningnetwork/lnd/lnwire"
10
)
11

12
// SignAnnouncement signs any type of gossip message that is announced on the
13
// network.
14
func SignAnnouncement(signer lnwallet.MessageSigner, keyLoc keychain.KeyLocator,
15
        msg lnwire.Message) (input.Signature, error) {
3✔
16

3✔
17
        var (
3✔
18
                data []byte
3✔
19
                err  error
3✔
20
        )
3✔
21

3✔
22
        switch m := msg.(type) {
3✔
UNCOV
23
        case *lnwire.ChannelAnnouncement1:
×
UNCOV
24
                data, err = m.DataToSign()
×
25
        case *lnwire.ChannelUpdate1:
3✔
26
                data, err = m.DataToSign()
3✔
27
        case *lnwire.NodeAnnouncement:
3✔
28
                data, err = m.DataToSign()
3✔
29
        default:
×
30
                return nil, fmt.Errorf("can't sign %T message", m)
×
31
        }
32
        if err != nil {
3✔
33
                return nil, fmt.Errorf("unable to get data to sign: %w", err)
×
34
        }
×
35

36
        return signer.SignMessage(keyLoc, data, true)
3✔
37
}
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