Skip to content

Commit

Permalink
Remove stellar-core new-db invocation when reingesting (#4003)
Browse files Browse the repository at this point in the history
It's not needed
  • Loading branch information
2opremio authored Oct 11, 2021
1 parent 10c7eda commit 678540d
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions ingest/ledgerbackend/stellar_core_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,20 +243,6 @@ func (r *stellarCoreRunner) createCmd(params ...string) *exec.Cmd {
return cmd
}

func (r *stellarCoreRunner) runCmd(params ...string) error {
cmd := r.createCmd(params...)
defer r.closeLogLineWriters(cmd)

if err := cmd.Start(); err != nil {
return errors.Wrapf(err, "could not start `stellar-core %v` cmd", params)
}

if err := cmd.Wait(); err != nil {
return errors.Wrapf(err, "error waiting for `stellar-core %v` subprocess", params)
}
return nil
}

// context returns the context.Context instance associated with the running captive core instance
func (r *stellarCoreRunner) context() context.Context {
return r.ctx
Expand All @@ -275,9 +261,6 @@ func (r *stellarCoreRunner) catchup(from, to uint32) error {
if r.started {
return errors.New("runner already started")
}
if err := r.runCmd("new-db"); err != nil {
return errors.Wrap(err, "error waiting for `stellar-core new-db` subprocess")
}

rangeArg := fmt.Sprintf("%d/%d", to, to-from+1)
r.cmd = r.createCmd(
Expand Down

0 comments on commit 678540d

Please sign in to comment.