Skip to content

Commit

Permalink
build: fix shadow linter in debug tools (#5442)
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Jun 2, 2023
1 parent 76942c4 commit e249905
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tools/debug/transplanter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"io"
"net"
"os"
"path"
"path/filepath"
"strings"
"sync"
Expand Down Expand Up @@ -212,18 +211,12 @@ func transcribeSnappyLog(filePath string, output chan txGroupItem, wg *sync.Wait
}
defer file.Close()

var headerDecoder headerDecoder
if strings.Contains(path.Base(filePath), "_v2") {
headerDecoder = decoderV2{}
} else {
headerDecoder = decoderV1{}
}

decoder := decoderV2{}
snappyReader := snappy.NewReader(file)
var n int

for {
headers, lenMsg, err := headerDecoder.decodeHeader(snappyReader)
headers, lenMsg, err := decoder.decodeHeader(snappyReader)
if err == io.EOF {
break
} else if err != nil {
Expand Down Expand Up @@ -395,7 +388,7 @@ func main() {
os.Exit(1)
}
syncRound := uint64(*roundStart) - cfg.MaxAcctLookback + 1
err := followerNode.SetSyncRound(syncRound)
err = followerNode.SetSyncRound(syncRound)
if err != nil {
fmt.Fprintf(os.Stderr, "Cannot configure catchup: %v", err)
os.Exit(1)
Expand Down

0 comments on commit e249905

Please sign in to comment.