Skip to content

Commit

Permalink
Fix review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
psheth9 committed Feb 8, 2024
1 parent ffb9d90 commit bb8872a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/soroban-rpc/internal/transactions/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,18 @@ func (m *MemoryStore) GetTransaction(hash xdr.Hash) (Transaction, bool, StoreRan
return Transaction{}, false, storeRange
}

var tx_meta xdr.TransactionMeta
err := tx_meta.UnmarshalBinary(internalTx.meta)
var txMeta xdr.TransactionMeta
err := txMeta.UnmarshalBinary(internalTx.meta)
if err != nil {
return Transaction{}, false, storeRange
}

txEvents, err := tx_meta.GetDiagnosticEvents()
txEvents, err := txMeta.GetDiagnosticEvents()
if err != nil {
return Transaction{}, false, storeRange
}

var events [][]byte
events := make([][]byte, 0, len(txEvents))

for _, e := range txEvents {
diagnosticEventXDR, err := e.MarshalBinary()
Expand Down
1 change: 1 addition & 0 deletions cmd/soroban-rpc/internal/transactions/transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ func TestGetTransactionsWithEventData(t *testing.T) {
tx, ok, _ := store.GetTransaction(txHash(1, false))
require.True(t, ok)
require.NotNil(t, tx.Events)
require.Equal(t, 1, len(tx.Events))

}

Expand Down

0 comments on commit bb8872a

Please sign in to comment.