-
Notifications
You must be signed in to change notification settings - Fork 87
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
Return Inner and Root transactions for nested logs support in C2C calls #820
Conversation
Add a null log in itxn Fix tests Fix inner asset id for cheeky test Fix transaction query for inner assets
5dd2bf7
to
6f245d6
Compare
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.
We should implement this with a new option to the transactions query to select whether or not to return the root transaction when matching an inner transaction. If you wrapped the LEFT OUTER JOIN
in buildTransactionQuery
with the new flag, I think most of the logic you have should work without changes.
Let me know if I'm missing something.
Codecov Report
@@ Coverage Diff @@
## develop #820 +/- ##
===========================================
+ Coverage 58.87% 59.10% +0.23%
===========================================
Files 36 36
Lines 4372 4382 +10
===========================================
+ Hits 2574 2590 +16
+ Misses 1484 1482 -2
+ Partials 314 310 -4
Continue to review full report at Codecov.
|
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.
Thanks for the updates, your changes look good. The only thing I see missing is a test that uses the new flag directly. Call db.Transactions
with and without ReturnInnerTxnOnly
and verify that the RootTxn is not returned when ReturnInnerTxnOnly
is set.
Summary
This PR includes some changes to support proper nested logs in inner transactions and adds/changes some tests to reflect this.
feature/contract-to-contract
will now allow inner transactions to haveappl
calls. This means inner txns may also be recursive and many "levels" deep, as innerappl
calls may have inner txns themselves.Since logs are associated with each
EvalDelta
, logs returned by inner transactions would have to be recursively parsed or else the current API will return only the root txn's logs, even if the query matches an inner txn. This PR changes the transaction query to fetch for an inner txn if areturnInnerTxn
flag in the filter is set to true so nested logs can be returned properly.Test Plan
appl
calls.Note: This PR also depends on the go-algorand
feature/contract-to-contract
branch due to nested inner txn logic.