-
Notifications
You must be signed in to change notification settings - Fork 93
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
Make inner transaction creatable ID lookup more resilient. #777
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #777 +/- ##
===========================================
+ Coverage 54.47% 54.55% +0.08%
===========================================
Files 28 28
Lines 3870 3877 +7
===========================================
+ Hits 2108 2115 +7
Misses 1481 1481
Partials 281 281
Continue to review full report at Codecov.
|
// pre v30 transactions do not have ApplyData.ConfigAsset or InnerTxns | ||
// so txn counter + payset pos calculation is OK | ||
assetid = block.TxnCounter - uint64(len(block.Payset)) + uint64(intra) + 1 | ||
} | ||
case protocol.AssetConfigTx: | ||
assetid = uint64(txn.ConfigAsset) | ||
assetid = uint64(txn.Txn.ConfigAsset) |
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.
Would be nice to add a test that txn.Txn.ConfigAsset
is actually used to set the asset
column. The reason why we have this bug is because we didn't have a test like this. :(
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.
I added one test that fails until making this change. It doesn't check ApplicationID
, is there anything else it's missing?
Summary
Make the inner transaction ID lookup more resilient by passing in a block pointer even though it shouldn't be required.
A crash was reported when using sandbox with
stable
algod (3.0.1) anddevelop
indexer (Nov 8):