Skip to content

Commit

Permalink
stellar#4909: review feedback, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sreuland committed Oct 25, 2023
1 parent 9a4d0eb commit dd30b6a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
5 changes: 1 addition & 4 deletions services/horizon/docker/verify-range/dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ cd stellar-go
# Below ensures we also fetch PR refs
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pull/*"
git fetch --force --quiet origin
/usr/local/go/bin/go build -v ./services/horizon/.



/usr/local/go/bin/go build -v ./services/horizon/.
2 changes: 0 additions & 2 deletions services/horizon/internal/db2/history/fee_bump_scenario.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/hex"
"encoding/json"
"fmt"
"testing"
"time"

Expand Down Expand Up @@ -271,7 +270,6 @@ func FeeBumpScenario(tt *test.T, q *Q, successful bool) FeeBumpFixture {
"bump_to": "98",
})

fmt.Print(string(details))
tt.Assert.NoError(err)

tt.Assert.NoError(opBuilder.Add(
Expand Down
10 changes: 5 additions & 5 deletions services/horizon/internal/ingest/processors/ledgers_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/stellar/go/xdr"
)

type LedgerInfo struct {
type ledgerInfo struct {
header xdr.LedgerHeaderHistoryEntry
successTxCount int
failedTxCount int
Expand All @@ -20,23 +20,23 @@ type LedgerInfo struct {

type LedgersProcessor struct {
batch history.LedgerBatchInsertBuilder
ledgers map[uint32]*LedgerInfo
ledgers map[uint32]*ledgerInfo
ingestVersion int
}

func NewLedgerProcessor(batch history.LedgerBatchInsertBuilder, ingestVersion int) *LedgersProcessor {
return &LedgersProcessor{
batch: batch,
ledgers: map[uint32]*LedgerInfo{},
ledgers: map[uint32]*ledgerInfo{},
ingestVersion: ingestVersion,
}
}

func (p *LedgersProcessor) ProcessLedger(lcm xdr.LedgerCloseMeta) *LedgerInfo {
func (p *LedgersProcessor) ProcessLedger(lcm xdr.LedgerCloseMeta) *ledgerInfo {
sequence := lcm.LedgerSequence()
entry, ok := p.ledgers[sequence]
if !ok {
entry = &LedgerInfo{header: lcm.LedgerHeaderHistoryEntry()}
entry = &ledgerInfo{header: lcm.LedgerHeaderHistoryEntry()}
p.ledgers[sequence] = entry
}
return entry
Expand Down
2 changes: 1 addition & 1 deletion support/db/internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const testSchema = `
CREATE TABLE IF NOT EXISTS people (
name character varying NOT NULL,
hunger_level integer NOT NULL,
json_value jsonb,
json_value jsonb,
PRIMARY KEY (name)
);
DELETE FROM people;
Expand Down

0 comments on commit dd30b6a

Please sign in to comment.