AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 18 Bitcoin

multi: appease go 1.26 vet for non-const format + goroutine Fatalf

Public commit record

What the developer wrote

Authored by Olaoluwa Osuntokun

83/100 · Strong
multi: appease go 1.26 vet for non-const format + goroutine Fatalf

In this commit, we fix two go vet errors that go 1.26 now treats as
hard failures during test compilation.

In btcjson/help.go, the final result row of a complex help description
was emitted via fmt.Fprintf with a non-constant format string (the
result text could contain '%' chars). Switch to fmt.Fprint, since
there are no format args here anyway.

In btcec/schnorr/musig2/musig2_test.go, the nonce-registration loop
ran inside a goroutine and called t.Fatalf on failure. Fatalf only
exits the calling goroutine, so the test goroutine would keep running
with stale state. Use t.Errorf + return so the failure is recorded
correctly and the goroutine exits cleanly.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes two minor issues flagged by Go 1.26's vet tool. One is a test-only bug where a failing test inside a goroutine used the wrong error-and-exit call, which could leave the test running with bad state. The other is a non-security formatting bug in help text generation where percent signs in user-visible descriptions could be misinterpreted as format codes. Neither appears to be an exploitable security vulnerability.

Recommended action

No immediate security action required. Treat as routine code-quality/test-hygiene fix. Reviewers may optionally verify that no other non-constant format strings are passed to fmt.Fprintf in user-facing output paths.

Security signals we found

01

Non-constant format string passed to fmt.Fprintf in help text generation

02

Incorrect use of t.Fatalf inside a goroutine in test code

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.