Skip to content

fix: restore Go module build and normalize segwit HRP checks - #2

Open
tolga-tom-nook wants to merge 2 commits into
BitgesellOfficial:mainfrom
tolga-tom-nook:fix/go-module-imports
Open

fix: restore Go module build and normalize segwit HRP checks#2
tolga-tom-nook wants to merge 2 commits into
BitgesellOfficial:mainfrom
tolga-tom-nook:fix/go-module-imports

Conversation

@tolga-tom-nook

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

Copy link
Copy Markdown

Summary

This restores a clean Go module build for bitgesell-utxo-dump after the repository was moved under BitgesellOfficial:

  • adds a root go.mod / go.sum for the current package tree;
  • updates stale imports from naftalimurgor / in3rsha paths to the canonical github.com/BitgesellOfficial/bitgesell-utxo-dump module path;
  • fixes a fmt.Println formatting misuse so the package passes go test ./... cleanly.

RED / GREEN proof

RED on upstream origin/main (02ec2c1):

$ go test ./...
pattern ./...: directory prefix . does not contain main module or its selected dependencies

GREEN on this branch:

$ go test ./...
?   	github.com/BitgesellOfficial/bitgesell-utxo-dump	[no test files]
?   	github.com/BitgesellOfficial/bitgesell-utxo-dump/src/bitgesell/bech32	[no test files]
?   	github.com/BitgesellOfficial/bitgesell-utxo-dump/src/bitgesell/bglleveldb	[no test files]
?   	github.com/BitgesellOfficial/bitgesell-utxo-dump/src/bitgesell/crypto	[no test files]
?   	github.com/BitgesellOfficial/bitgesell-utxo-dump/src/bitgesell/keys	[no test files]

git diff --check origin/main...HEAD is clean.

Bounty context

Submitted for the Bitgesell improvement / PR bounty program:

Payout address, if accepted: 0x4a76c7E64C08cF29B59eFC640b4ada97A270d428 (EVM/USDT-compatible).

Additional validation/update (2026-06-05):

  • Added a focused Bech32/SegWit regression test for all-uppercase HRP/address round-tripping.
  • Fixed SegwitAddrDecode to normalize the expected HRP before comparing it with Decode's lowercased HRP result. This keeps the decoder consistent with the package's own Encode("BGL", ...) behavior and avoids rejecting valid all-uppercase Bech32 strings.
  • Validation:
    • go test ./src/bitgesell/bech32 -run TestSegwitAddrDecodeAcceptsUppercaseHRP -count=1
    • go test ./...
    • git diff --check

@MyTH-zyxeon

Copy link
Copy Markdown

Review-assist note for the Bitgesell #81 improvement lane.

I checked the public PR body and diff. This is a focused Go module/build restoration fix:

  • adds a root go.mod and go.sum so go test ./... has a module context after the repository move
  • updates stale import paths from naftalimurgor / in3rsha to the canonical github.com/BitgesellOfficial/bitgesell-utxo-dump module path
  • fixes the fmt.Println formatting misuse by using fmt.Printf where an error value is interpolated
  • keeps the change scoped to build/import correctness and does not touch wallet keys, chainstate parsing semantics, or live-chain behavior

Suggested maintainer checks before merge:

  • run go test ./...
  • run go mod tidy and confirm it does not introduce unexpected dependency churn
  • grep for remaining stale naftalimurgor and in3rsha import paths
  • confirm the selected Go version/dependency versions match the project support policy before tagging a release

From the public patch shape, this looks like a useful low-risk build/testability candidate for the #81 improvement queue. I did not run Go, parse chainstate, access wallets, payment, or live-chain actions for this review-assist note.

@tolga-tom-nook tolga-tom-nook changed the title fix: restore Go module build fix: restore Go module build and normalize segwit HRP checks Jun 5, 2026
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