diff --git a/cmd/soroban-rpc/internal/ledgerentry_storage/db.go b/cmd/soroban-rpc/internal/ledgerentry_storage/db.go index 78a8f263db..47fb3e62f8 100644 --- a/cmd/soroban-rpc/internal/ledgerentry_storage/db.go +++ b/cmd/soroban-rpc/internal/ledgerentry_storage/db.go @@ -209,20 +209,16 @@ func (s *sqlDB) NewLedgerEntryUpdaterTx(forLedgerSequence uint32, maxBatchSize i } ret := &ledgerUpdaterTx{ tx: tx, + stmtCache: sq.NewStmtCache(tx), postWriteCommitHook: s.postWriteCommitHook, forLedgerSequence: forLedgerSequence, maxBatchSize: maxBatchSize, buffer: xdr.NewEncodingBuffer(), keyToEntryBatch: make(map[string]*string, maxBatchSize), } - ret.stmtCache = sq.NewStmtCache(tx) return ret, nil } -func (l *ledgerUpdaterTx) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) { - return l.tx.PrepareContext(ctx, query) -} - func (l *ledgerUpdaterTx) flushLedgerEntryBatch() error { upsertCount := 0 upsertSQL := sq.StatementBuilder.RunWith(l.stmtCache).Replace(ledgerEntriesTableName) diff --git a/cmd/soroban-rpc/internal/ledgerentry_storage/ledgerentry_storage.go b/cmd/soroban-rpc/internal/ledgerentry_storage/ledgerentry_storage.go index 5cee96add4..f678510a9a 100644 --- a/cmd/soroban-rpc/internal/ledgerentry_storage/ledgerentry_storage.go +++ b/cmd/soroban-rpc/internal/ledgerentry_storage/ledgerentry_storage.go @@ -2,7 +2,6 @@ package ledgerentry_storage import ( "context" - "fmt" "io" "sync" "time" @@ -154,7 +153,7 @@ func (ls *ledgerEntryStorage) run(ctx context.Context, archive historyarchive.Ar nextLedger := startCheckpointLedger + 1 for { - fmt.Println("Processing txmeta of ledger", nextLedger) + ls.logger.Info("Processing txmeta of ledger", nextLedger) reader, err := ingest.NewLedgerChangeReader(ctx, ledgerBackend, ls.networkPassPhrase, nextLedger) if err != nil { panic(err)