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

lightningnetwork / lnd / 12033440129

26 Nov 2024 03:03PM UTC coverage: 48.738% (-10.3%) from 58.999%
12033440129

Pull #9309

github

yyforyongyu
gomod: update `btcd` for shutdown fix
Pull Request #9309: chainntnfs: fix `TestHistoricalConfDetailsTxIndex`

97664 of 200385 relevant lines covered (48.74%)

0.52 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.
25
func (c ErrorCode) String() string {
×
26
        switch c {
×
27
        case CodeOK:
×
28
                return "CodeOK"
×
29
        case CodeTemporaryFailure:
×
30
                return "CodeTemporaryFailure"
×
31
        case CodePermanentFailure:
×
32
                return "CodePermanentFailure"
×
33
        case CreateSessionCodeAlreadyExists:
×
34
                return "CreateSessionCodeAlreadyExists"
×
35
        case CreateSessionCodeRejectMaxUpdates:
×
36
                return "CreateSessionCodeRejectMaxUpdates"
×
37
        case CreateSessionCodeRejectRewardRate:
×
38
                return "CreateSessionCodeRejectRewardRate"
×
39
        case CreateSessionCodeRejectSweepFeeRate:
×
40
                return "CreateSessionCodeRejectSweepFeeRate"
×
41
        case CreateSessionCodeRejectBlobType:
×
42
                return "CreateSessionCodeRejectBlobType"
×
43
        case StateUpdateCodeClientBehind:
×
44
                return "StateUpdateCodeClientBehind"
×
45
        case StateUpdateCodeMaxUpdatesExceeded:
×
46
                return "StateUpdateCodeMaxUpdatesExceeded"
×
47
        case StateUpdateCodeSeqNumOutOfOrder:
×
48
                return "StateUpdateCodeSeqNumOutOfOrder"
×
49
        case DeleteSessionCodeNotFound:
×
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