-
Notifications
You must be signed in to change notification settings - Fork 91
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
Write app call addresses in txn_participation
table
#770
Conversation
2264ab9
to
eda1a3a
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.
One request otherwise looks fine.
db, shutdownFunc := setupPostgres(t) | ||
defer shutdownFunc() | ||
|
||
block := bookkeeping.Block{ |
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 think you can use block, err := test.MakeBlockForTxns(test.MakeGenesisBlock().BlockHeader, &stxnad)
instead of constructing this object yourself.
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 wanted to use a round number that is not 0 or 1 for the basic test, and now that the tests are merged, I think we should keep the current construct.
@@ -410,6 +410,70 @@ func TestWriterTxnParticipationTableBasic(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestWriterTxnParticipationTableAppCallAddresses(t *testing.T) { |
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.
Could you merge this with TestWriterTxnParticipationTableBasic
? These tests appear to be identical except for the transactions and expected results, so they could be data-driven with one of those test case structs.
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.
done
Codecov Report
@@ Coverage Diff @@
## develop #770 +/- ##
===========================================
- Coverage 54.78% 54.47% -0.32%
===========================================
Files 27 28 +1
Lines 3875 3870 -5
===========================================
- Hits 2123 2108 -15
- Misses 1471 1481 +10
Partials 281 281
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 change, looks good.
Summary
Closes #768.
TODO: don't filter out the zero address. It is a real address and people are curious about how much algos it receives.
Test Plan
Added a unit test that checks that app call address are written in the
txn_participation
table.