-
Notifications
You must be signed in to change notification settings - Fork 369
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
Test that events that are emitted during block finalization are included in the blocks #1798
Merged
Merged
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
45b9073
added a simple test
mrsmkl 2568873
fixing lint
mrsmkl 5de8a8f
Merge branch 'master' into extra-receipt-test
mrsmkl e082fb5
Merge branch 'master' into extra-receipt-test
b08928c
Merge branch 'master' of github.com:celo-org/celo-monorepo into extra…
mrsmkl 4e9b30b
improved test
mrsmkl e963123
Merge branch 'master' of github.com:celo-org/celo-monorepo into extra…
mrsmkl d14436c
Merge branch 'extra-receipt-test' of github.com:mrsmkl/celo-monorepo …
mrsmkl 9d7c89d
Merge branch 'master' into extra-receipt-test
mrsmkl 356a225
adding events
mrsmkl 1e754f0
Merge branch 'extra-receipt-test' of github.com:mrsmkl/celo-monorepo …
mrsmkl 057c212
added test for events
mrsmkl 039b70d
Merge branch 'master' into extra-receipt-test
20b9ad0
Merge branch 'master' into extra-receipt-test
timmoreton cd420cd
Merge branch 'master' into extra-receipt-test
mrsmkl a39fb3d
Merge branch 'master' into extra-receipt-test
jcortejoso c36dfa8
Merge branch 'master' into extra-receipt-test
mrsmkl 5e3459f
Merge branch 'master' into extra-receipt-test
010a0e8
Merge branch 'master' into extra-receipt-test
mrsmkl efc2058
Merge branch 'master' into extra-receipt-test
f59fbdc
Merge branch 'master' into extra-receipt-test
0513d48
Merge branch 'master' into extra-receipt-test
cd1b946
Merge branch 'master' into extra-receipt-test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can we test that the correct events are emitted, and also that the events are only emitted during epoch blocks?
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.
Ok, adding more checks.
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.
Ah, didn't realize that we don't actually emit the main events that we'd want to record.
More specifically, can we check that the following events are emitted in finalizing the last block of the epoch, and that no events are emitted in finalizing any other block?
TargetVotingYieldUpdated
(needs to be added toEpochRewards.updateTargetVotingYield
)ValidatorEpochPaymentDistributed
(needs to be added toValidators.distributeEpochPayementsFromSigner
)EpochRewardsDistributedToVoters
(needs to be added toElection.distributeEpochRewards
)And can you please add unit tests that check for these events as well?
Thanks!