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

lightningnetwork / lnd / 13725358077

07 Mar 2025 04:51PM UTC coverage: 58.224% (-10.4%) from 68.615%
13725358077

Pull #9458

github

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

346 of 549 new or added lines in 10 files covered. (63.02%)

27466 existing lines in 443 files now uncovered.

94609 of 162492 relevant lines covered (58.22%)

1.81 hits per line

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

0.0
/lnencrypt/test_utils.go
1
package lnencrypt
2

3
import (
4
        "fmt"
5

6
        "github.com/btcsuite/btcd/btcec/v2"
7
        "github.com/lightningnetwork/lnd/keychain"
8
)
9

10
var (
11
        testWalletPrivKey = []byte{
12
                0x2b, 0xd8, 0x06, 0xc9, 0x7f, 0x0e, 0x00, 0xaf,
13
                0x1a, 0x1f, 0xc3, 0x32, 0x8f, 0xa7, 0x63, 0xa9,
14
                0x26, 0x97, 0x23, 0xc8, 0xdb, 0x8f, 0xac, 0x4f,
15
                0x93, 0xaf, 0x71, 0xdb, 0x18, 0x6d, 0x6e, 0x90,
16
        }
17
)
18

19
type MockKeyRing struct {
20
        Fail bool
21
}
22

23
func (m *MockKeyRing) DeriveNextKey(
24
        keyFam keychain.KeyFamily) (keychain.KeyDescriptor, error) {
×
25

×
26
        return keychain.KeyDescriptor{}, nil
×
27
}
×
28

29
func (m *MockKeyRing) DeriveKey(
UNCOV
30
        keyLoc keychain.KeyLocator) (keychain.KeyDescriptor, error) {
×
UNCOV
31

×
UNCOV
32
        if m.Fail {
×
UNCOV
33
                return keychain.KeyDescriptor{}, fmt.Errorf("fail")
×
UNCOV
34
        }
×
35

UNCOV
36
        _, pub := btcec.PrivKeyFromBytes(testWalletPrivKey)
×
UNCOV
37
        return keychain.KeyDescriptor{
×
UNCOV
38
                PubKey: pub,
×
UNCOV
39
        }, nil
×
40
}
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