Skip to content

Commit

Permalink
Fix shadow
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekn committed Nov 4, 2020
1 parent 89fa9c5 commit 09fd2cd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ingest/ledgerbackend/captive_core_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ loop:
return false, xdr.LedgerCloseMeta{}, nil
}

var metaResult metaResult
var result metaResult
select {
case <-c.stellarCoreRunner.getProcessExitChan():
processErr := c.stellarCoreRunner.getProcessExitError()
Expand All @@ -418,14 +418,14 @@ loop:
errOut = errors.New("stellar-core process exited unexpectedly without an error")
}
break loop
case metaResult = <-c.ledgerBuffer.GetChannel():
case result = <-c.ledgerBuffer.GetChannel():
}
if metaResult.err != nil {
errOut = metaResult.err
if result.err != nil {
errOut = result.err
break loop
}

seq := metaResult.LedgerCloseMeta.LedgerSequence()
seq := result.LedgerCloseMeta.LedgerSequence()
if seq != c.nextLedger {
// We got something unexpected; close and reset
errOut = errors.Errorf("unexpected ledger (expected=%d actual=%d)", c.nextLedger, seq)
Expand All @@ -434,7 +434,7 @@ loop:
c.nextLedger++
if seq == sequence {
// Found the requested seq
c.cachedMeta = metaResult.LedgerCloseMeta
c.cachedMeta = result.LedgerCloseMeta

// If we got the _last_ ledger in a segment, close before returning.
if c.lastLedger != nil && *c.lastLedger == seq {
Expand Down

0 comments on commit 09fd2cd

Please sign in to comment.