Skip to content

Commit

Permalink
Fix yet another typo
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Sep 11, 2023
1 parent 3b63b1c commit eeb801b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions cmd/soroban-rpc/internal/ingest/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,18 @@ func (s *Service) fillEntriesFromCheckpoint(ctx context.Context, archive history
func (s *Service) ingest(ctx context.Context, sequence uint32) error {
startTime := time.Now()
s.logger.Infof("Ingesting ledger %d", sequence)
s.logger.Infof("Ingesting ledger %d (before GetLedger)", sequence)
ledgerCloseMeta, err := s.ledgerBackend.GetLedger(ctx, sequence)
if err != nil {
return err
}
s.logger.Infof("Ingesting ledger %d (after GetLedger)", sequence)
s.logger.Infof("Ingesting ledger %d (before NewLedgerChangeReaderFromLedgerCloseMeta)", sequence)
reader, err := ingest.NewLedgerChangeReaderFromLedgerCloseMeta(s.networkPassPhrase, ledgerCloseMeta)
if err != nil {
return err
}
s.logger.Infof("Ingesting ledger %d (before NexTx)", sequence)
tx, err := s.db.NewTx(ctx)
if err != nil {
return err
Expand All @@ -249,10 +253,12 @@ func (s *Service) ingest(ctx context.Context, sequence uint32) error {
s.logger.WithError(err).Warn("could not rollback ingest write transactions")
}
}()
s.logger.Infof("Ingesting ledger %d (before ingestLedgerEntryChanges)", sequence)

if err := s.ingestLedgerEntryChanges(ctx, reader, tx, 0); err != nil {
return err
}
s.logger.Infof("Ingesting ledger %d (before reader.Close)", sequence)
if err := reader.Close(); err != nil {
return err
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/soroban-rpc/internal/methods/send_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package methods
import (
"context"
"encoding/hex"
"fmt"

"github.com/creachadair/jrpc2"
"github.com/creachadair/jrpc2/handler"
Expand Down Expand Up @@ -72,6 +73,7 @@ func NewSendTransactionHandler(daemon interfaces.Daemon, logger *log.Entry, stor
txHash := hex.EncodeToString(hash[:])

ledgerInfo := store.GetLatestLedger()
fmt.Printf("\n\n\nTX: %s\n\n\n", txHash)
resp, err := submitter.SubmitTransaction(ctx, request.Transaction)
if err != nil {
logger.WithError(err).
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-rpc/internal/test/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func outputsContractIDInLastLine(t *testing.T, output string) {
}
}
require.GreaterOrEqual(t, len(nonEmptyLines), 1)
contractID := lines[len(lines)-1]
contractID := nonEmptyLines[len(nonEmptyLines)-1]
require.Len(t, contractID, 56)
require.Regexp(t, "^C", contractID)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-rpc/internal/test/core-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ if [ "$1" = "standalone" ]; then
popd
fi

exec stellar-core run --console
exec stellar-core run --console --ll debug

0 comments on commit eeb801b

Please sign in to comment.