From abc9e2493f0a8a89ad7aeba5d08f02b1bdc140ec Mon Sep 17 00:00:00 2001 From: JT Olio Date: Sun, 6 Mar 2022 16:30:07 -0700 Subject: [PATCH] satellite/compensation: add a code that crypthopper-go now uses it's a bit weird that these code definitions are in storj/storj instead of storj/crypthopper-go, but as it stands, we should make sure this package knows about all the codes in use. Change-Id: I8df4666a015098e2d2e536d2f6c8ca5317a4369c --- satellite/compensation/codes.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/satellite/compensation/codes.go b/satellite/compensation/codes.go index 6215bebf3..25a4a8d4f 100644 --- a/satellite/compensation/codes.go +++ b/satellite/compensation/codes.go @@ -30,13 +30,17 @@ const ( // Offline is included if the node's last contact success is before the starting // period. Offline Code = "O" + + // Bonus is included if the node has qualified for special bonus circumstances, + // chosen month by month by the crypthopper-go accountant prepare step. + Bonus Code = "B" ) // CodeFromString parses the string into a Code. func CodeFromString(s string) (Code, error) { code := Code(s) switch code { - case Disqualified, Sanctioned, No1099, InWithholding, GracefulExit, Offline: + case Disqualified, Sanctioned, No1099, InWithholding, GracefulExit, Offline, Bonus: return code, nil default: return "", Error.New("no such code %q", code)