Skip to content

Commit

Permalink
CR comments addressed.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalouf committed Jul 10, 2023
1 parent d2d01c7 commit cb5d00f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/algod/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package main
import (
"flag"
"fmt"
"github.com/algorand/go-algorand/util"
"math/rand"
"os"
"path/filepath"
Expand Down Expand Up @@ -158,10 +159,10 @@ func run() int {
}
defer fileLock.Unlock()

// Delete legaxy indexer.sqlite file if it happens to exist
// Delete legacy indexer.sqlite file if it happens to exist
indexerDBPath := filepath.Join(absolutePath, genesis.ID(), "indexer.sqlite")

if _, idxFilePathErr := os.Stat(indexerDBPath); idxFilePathErr == nil {
if util.FileExists(indexerDBPath) {
if idxFileRemoveErr := os.Remove(indexerDBPath); idxFileRemoveErr != nil {
fmt.Fprintln(os.Stderr, "Error removing indexer.sqlite file from Data directory", idxFileRemoveErr)
} else {
Expand Down

0 comments on commit cb5d00f

Please sign in to comment.