Skip to content

fix: correct mempool test formatting failure - #4

Open
tolga-tom-nook wants to merge 1 commit into
BitgesellOfficial:masterfrom
tolga-tom-nook:fix/mempool-test-formatting
Open

fix: correct mempool test formatting failure#4
tolga-tom-nook wants to merge 1 commit into
BitgesellOfficial:masterfrom
tolga-tom-nook:fix/mempool-test-formatting

Conversation

@tolga-tom-nook

@tolga-tom-nook tolga-tom-nook commented May 24, 2026

Copy link
Copy Markdown

Summary

  • changes a t.Fatal call with a %d formatting directive to t.Fatalf
  • fixes the Go vet/build failure in the mempool test package

Root cause / acceptance proof

On the upstream BitgesellOfficial/bgld master branch, go test ./mempool currently fails before tests run because vet rejects the formatting directive passed to t.Fatal:

mempool/mempool_test.go:563:4: (*testing.common).Fatal call has possible Printf formatting directive %d
FAIL	github.com/bitgesellofficial/bgld/mempool [build failed]

This PR uses t.Fatalf, which is the intended testing helper when the message has printf-style formatting plus arguments.

Validation

  • RED on upstream master: go test ./mempool fails with the vet error above
  • GREEN on this branch: go test ./mempool
ok  	github.com/bitgesellofficial/bgld/mempool	0.169s

Bounty note

Submitting as a focused test/build reliability improvement for the Bitgesell bounty/improvement program, especially BitgesellOfficial/bitgesell#81. If approved for payout, USDT/EVM-compatible address: 0x4a76c7E64C08cF29B59eFC640b4ada97A270d428.

Assisted by Hermes Agent.

Fix a `testing.T.Fatal` call that includes a `%d` formatting directive and an argument.\n\n`go test ./mempool` fails vet/build validation with:\n\n    (*testing.common).Fatal call has possible Printf formatting directive %d\n\nSwitching to `Fatalf` matches the call shape and keeps the intended assertion message.
@MyTH-zyxeon

Copy link
Copy Markdown

Maintainers: this PR looks like a clean Bitgesell btcsuite#81 candidate because it fixes a real go test ./mempool blocker with a one-line, behavior-preserving change.

Acceptance checks I would use before merge:

  • confirm the upstream RED/GREEN proof still reproduces exactly as written (go test ./mempool failing on master, then passing on this branch)
  • verify the helper change is intentionally limited to formatting semantics (t.Fatal -> t.Fatalf) and does not alter orphan-processing logic or test expectations
  • if you track docs-only vs build-fix payout tiers differently under save mempool to disk btcsuite/btcd#81, treat this as a build/test reliability fix rather than a docs cleanup

From the public diff, this is the sort of narrow maintainer-friendly patch that should be easy to approve if the branch still reproduces the vet failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants