Review of 083: the give-up message says to wait out the mesh's hold before asking again; the installer no longer says the token is spent when it may not be

This commit is contained in:
2026-09-22 14:23:20 +02:00
parent c8bbdb2da5
commit eaebae7b36
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -94,8 +94,11 @@ func answered(reply EnrolReply, asking time.Duration) (again bool, err error) {
case reply.TryAgain && asking < EnrolPatience:
return true, nil
case reply.TryAgain:
return false, fmt.Errorf("%w for %s: %s. The token was not spent — run enrol again with it",
ErrNotNow, EnrolPatience, reply.Refusal)
// Said with what to do. The mesh holds the token for this attempt's keys for as long as
// this node kept asking, so a new attempt — with keys of its own — waits that out first.
return false, fmt.Errorf("%w for %s: %s. The token was not spent: wait about %s and run "+
"enrol again with it; if it is then refused, issue a new one",
ErrNotNow, EnrolPatience, reply.Refusal, EnrolPatience)
default:
return false, fmt.Errorf("%w: %s", ErrRefused, reply.Refusal)
}