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

lightningnetwork / lnd / 12012751795

25 Nov 2024 02:40PM UTC coverage: 49.835% (-9.2%) from 59.013%
12012751795

Pull #9303

github

yyforyongyu
lnwallet: add debug logs
Pull Request #9303: htlcswitch+routing: handle nil pointer dereference properly

20 of 23 new or added lines in 4 files covered. (86.96%)

25467 existing lines in 425 files now uncovered.

99835 of 200331 relevant lines covered (49.84%)

2.07 hits per line

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

0.0
/watchtower/wtwire/error_code.go
1
package wtwire
2

3
import "fmt"
4

5
// ErrorCode represents a generic error code used when replying to watchtower
6
// clients. Specific reply messages may extend the ErrorCode primitive and add
7
// custom codes, so long as they don't collide with the generic error codes..
8
type ErrorCode uint16
9

10
const (
11
        // CodeOK signals that the request was successfully processed by the
12
        // watchtower.
13
        CodeOK ErrorCode = 0
14

15
        // CodeTemporaryFailure alerts the client that the watchtower is
16
        // temporarily unavailable, but that it may try again at a later time.
17
        CodeTemporaryFailure ErrorCode = 40
18

19
        // CodePermanentFailure alerts the client that the watchtower has
20
        // permanently failed, and further communication should be avoided.
21
        CodePermanentFailure ErrorCode = 50
22
)
23

24
// String returns a human-readable description of an ErrorCode.
UNCOV
25
func (c ErrorCode) String() string {
×
UNCOV
26
        switch c {
×
UNCOV
27
        case CodeOK:
×
UNCOV
28
                return "CodeOK"
×
29
        case CodeTemporaryFailure:
×
30
                return "CodeTemporaryFailure"
×
UNCOV
31
        case CodePermanentFailure:
×
UNCOV
32
                return "CodePermanentFailure"
×
UNCOV
33
        case CreateSessionCodeAlreadyExists:
×
UNCOV
34
                return "CreateSessionCodeAlreadyExists"
×
35
        case CreateSessionCodeRejectMaxUpdates:
×
36
                return "CreateSessionCodeRejectMaxUpdates"
×
37
        case CreateSessionCodeRejectRewardRate:
×
38
                return "CreateSessionCodeRejectRewardRate"
×
39
        case CreateSessionCodeRejectSweepFeeRate:
×
40
                return "CreateSessionCodeRejectSweepFeeRate"
×
UNCOV
41
        case CreateSessionCodeRejectBlobType:
×
UNCOV
42
                return "CreateSessionCodeRejectBlobType"
×
UNCOV
43
        case StateUpdateCodeClientBehind:
×
UNCOV
44
                return "StateUpdateCodeClientBehind"
×
UNCOV
45
        case StateUpdateCodeMaxUpdatesExceeded:
×
UNCOV
46
                return "StateUpdateCodeMaxUpdatesExceeded"
×
UNCOV
47
        case StateUpdateCodeSeqNumOutOfOrder:
×
UNCOV
48
                return "StateUpdateCodeSeqNumOutOfOrder"
×
UNCOV
49
        case DeleteSessionCodeNotFound:
×
UNCOV
50
                return "DeleteSessionCodeNotFound"
×
51
        default:
×
52
                return fmt.Sprintf("UnknownErrorCode: %d", c)
×
53
        }
54
}
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