Skip to content

Commit

Permalink
undo changes - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya1702 committed Jan 18, 2024
1 parent 532a6ae commit 6063490
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cmd/soroban-rpc/internal/methods/get_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type GetTransactionRequest struct {
}

type transactionGetter interface {
GetTransaction(hash xdr.Hash) (transactions.Transaction, bool, transactions.StoreRange, error)
GetTransaction(hash xdr.Hash) (transactions.Transaction, bool, transactions.StoreRange)
}

func GetTransaction(getter transactionGetter, request GetTransactionRequest) (GetTransactionResponse, error) {
Expand All @@ -84,7 +84,7 @@ func GetTransaction(getter transactionGetter, request GetTransactionRequest) (Ge
}
}

tx, found, storeRange, err := getter.GetTransaction(txHash)
tx, found, storeRange := getter.GetTransaction(txHash)
if err != nil {
return GetTransactionResponse{}, err
}
Expand Down
7 changes: 2 additions & 5 deletions cmd/soroban-rpc/internal/methods/send_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type SendTransactionRequest struct {
// LatestLedgerStore is a store which returns the latest ingested ledger.
type LatestLedgerStore interface {
// GetLatestLedger returns the latest ingested ledger.
GetLatestLedger() (transactions.LedgerInfo, error)
GetLatestLedger() transactions.LedgerInfo
}

// NewSendTransactionHandler returns a submit transaction json rpc handler
Expand All @@ -74,10 +74,7 @@ func NewSendTransactionHandler(daemon interfaces.Daemon, logger *log.Entry, stor
}
txHash := hex.EncodeToString(hash[:])

ledgerInfo, err := store.GetLatestLedger()
if err != nil {
return SendTransactionResponse{}, err
}
ledgerInfo := store.GetLatestLedger()

resp, err := submitter.SubmitTransaction(ctx, request.Transaction)
if err != nil {
Expand Down

0 comments on commit 6063490

Please sign in to comment.