go-ethereum/cmd/utils
Yorick Downe 369521becb
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
cmd/utils: avoid extra newlines when reading era checksums (#35104)
The checksum count during EraE import is off by one when `checksums.txt`
ends its last line on a newline, as the pandaops file does. The current
code would result in one empty string after the final `\n`, something
like

```
[]string{
    "line1",
    "line2",
    "line3",
    "",
}
```

Trim off the final `\n`, if it exists: `return
strings.Split(strings.TrimRight(string(b), "\n"), "\n"), nil`

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
2026-06-03 11:48:45 -06:00
..
cmd.go cmd/utils: avoid extra newlines when reading era checksums (#35104) 2026-06-03 11:48:45 -06:00
diskusage.go all: add build tags for wasip1 (#31090) 2025-01-30 16:58:53 +01:00
diskusage_openbsd.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
diskusage_windows.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
export_test.go all: use fmt.Appendf instead of fmt.Sprintf where possible (#31301) 2025-03-25 14:53:02 +01:00
flags.go internal/era: update to latest ere spec (#34896) 2026-06-03 11:52:10 +02:00
flags_legacy.go cmd/clef, cmd/geth: remove CLI flags that were deprecated for more than a year (#35021) 2026-05-27 14:58:31 +02:00
flags_test.go build: update to golangci-lint 1.61.0 (#30587) 2024-10-14 19:25:22 +02:00
history_test.go cmd/utils: avoid extra newlines when reading era checksums (#35104) 2026-06-03 11:48:45 -06:00
prompt.go cmd/geth: remove unlock commandline flag (#30737) 2024-11-15 10:15:15 +01:00