-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add events data to GetTransaction rpc #1192
Conversation
4b8e79e
to
8dcb16a
Compare
Once ready for review, please close this PR and reopen in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Minor nits below ⬇️
@@ -198,10 +199,33 @@ func (m *MemoryStore) GetTransaction(hash xdr.Hash) (Transaction, bool, StoreRan | |||
if !ok { | |||
return Transaction{}, false, storeRange | |||
} | |||
|
|||
var tx_meta xdr.TransactionMeta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: style consistency so let's use camelCase
return Transaction{}, false, storeRange | ||
} | ||
|
||
var events [][]byte |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preallocate since we know the size?
var events [][]byte | |
events := make([]byte, 0, len(txEvents)) |
tx, ok, _ := store.GetTransaction(txHash(1, false)) | ||
require.True(t, ok) | ||
require.NotNil(t, tx.Events) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
length check (easier) or content check (harder) would be good here besides not-nil
Moving to soroban-rpc |
More details here --> stellar/stellar-rpc#16
Known limitations
NA