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

lightningnetwork / lnd / 12293715361

12 Dec 2024 09:38AM UTC coverage: 57.483% (+7.9%) from 49.538%
12293715361

Pull #9348

github

ziggie1984
github: update goveralls tool

The goverall tool had a bug regarding the module versioning of
golang packages see also
https://github.com/mattn/goveralls/pull/222 for more background.
Goveralls is wrapped by another library to make it available for
github actions. So the relevant PR which is referenced here in
LND is:
https://github.com/shogo82148/actions-goveralls/pull/521.
Pull Request #9348: github: update goveralls tool

101897 of 177264 relevant lines covered (57.48%)

24982.4 hits per line

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

0.0
/lncfg/remotesigner.go
1
package lncfg
2

3
import (
4
        "fmt"
5
        "time"
6
)
7

8
const (
9
        // DefaultRemoteSignerRPCTimeout is the default timeout that is used
10
        // when forwarding a request to the remote signer through RPC.
11
        DefaultRemoteSignerRPCTimeout = 5 * time.Second
12
)
13

14
// RemoteSigner holds the configuration options for a remote RPC signer.
15
//
16
//nolint:ll
17
type RemoteSigner struct {
18
        Enable           bool          `long:"enable" description:"Use a remote signer for signing any on-chain related transactions or messages. Only recommended if local wallet is initialized as watch-only. Remote signer must use the same seed/root key as the local watch-only wallet but must have private keys."`
19
        RPCHost          string        `long:"rpchost" description:"The remote signer's RPC host:port"`
20
        MacaroonPath     string        `long:"macaroonpath" description:"The macaroon to use for authenticating with the remote signer"`
21
        TLSCertPath      string        `long:"tlscertpath" description:"The TLS certificate to use for establishing the remote signer's identity"`
22
        Timeout          time.Duration `long:"timeout" description:"The timeout for connecting to and signing requests with the remote signer. Valid time units are {s, m, h}."`
23
        MigrateWatchOnly bool          `long:"migrate-wallet-to-watch-only" description:"If a wallet with private key material already exists, migrate it into a watch-only wallet on first startup. WARNING: This cannot be undone! Make sure you have backed up your seed before you use this flag! All private keys will be purged from the wallet after first unlock with this flag!"`
24
}
25

26
// Validate checks the values configured for our remote RPC signer.
27
func (r *RemoteSigner) Validate() error {
×
28
        if !r.Enable {
×
29
                return nil
×
30
        }
×
31

32
        if r.Timeout < time.Millisecond {
×
33
                return fmt.Errorf("remote signer: timeout of %v is invalid, "+
×
34
                        "cannot be smaller than %v", r.Timeout,
×
35
                        time.Millisecond)
×
36
        }
×
37

38
        if r.MigrateWatchOnly && !r.Enable {
×
39
                return fmt.Errorf("remote signer: cannot turn on wallet " +
×
40
                        "migration to watch-only if remote signing is not " +
×
41
                        "enabled")
×
42
        }
×
43

44
        return nil
×
45
}
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