From 23ec1b82a7d568b27551bc6b08fc0ffd8326d163 Mon Sep 17 00:00:00 2001 From: Jason Cameron Date: Thu, 22 Jan 2026 09:52:15 -0500 Subject: [PATCH] chore: add comments back to Challenge struct. (#1419) See #1284 and https://github.com/TecharoHQ/anubis/pull/1284#issuecomment-3784096905 --- lib/challenge/challenge.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/challenge/challenge.go b/lib/challenge/challenge.go index d0cfbf7..d075930 100644 --- a/lib/challenge/challenge.go +++ b/lib/challenge/challenge.go @@ -4,12 +4,12 @@ import "time" // Challenge is the metadata about a single challenge issuance. type Challenge struct { - IssuedAt time.Time `json:"issuedAt"` - Metadata map[string]string `json:"metadata"` - ID string `json:"id"` - Method string `json:"method"` - RandomData string `json:"randomData"` - PolicyRuleHash string `json:"policyRuleHash,omitempty"` - Difficulty int `json:"difficulty,omitempty"` - Spent bool `json:"spent"` + IssuedAt time.Time `json:"issuedAt"` // When the challenge was issued + Metadata map[string]string `json:"metadata"` // Challenge metadata such as IP address and user agent + ID string `json:"id"` // UUID identifying the challenge + Method string `json:"method"` // Challenge method + RandomData string `json:"randomData"` // The random data the client processes + PolicyRuleHash string `json:"policyRuleHash,omitempty"` // Hash of the policy rule that issued this challenge + Difficulty int `json:"difficulty,omitempty"` // Difficulty that was in effect when issued + Spent bool `json:"spent"` // Has the challenge already been solved? }