Add validity check to finalization#111
Merged
gaudenzkessler merged 3 commits intodevelopfrom Oct 27, 2022
Merged
Conversation
f13a6fb to
6170b11
Compare
6170b11 to
e3cb627
Compare
1dd53ba to
eed4a65
Compare
clangenb
approved these changes
Oct 27, 2022
Contributor
clangenb
left a comment
There was a problem hiding this comment.
Perfect, thanks for the extra mile!
Comment on lines
+28
to
+51
| #[test] | ||
| fn confirm_imported_sidechain_block_invalid_next_finalization_candidate() { | ||
| new_test_ext().execute_with(|| { | ||
| Timestamp::set_timestamp(TEST7_TIMESTAMP); | ||
| let hash = H256::default(); | ||
| let signer7 = get_signer(TEST7_SIGNER_PUB); | ||
| let shard7 = H256::from_slice(&TEST7_MRENCLAVE); | ||
|
|
||
| let block_number = 1; | ||
|
|
||
| register_enclave7(); | ||
|
|
||
| assert_err!( | ||
| Sidechain::confirm_imported_sidechain_block( | ||
| Origin::signed(signer7.clone()), | ||
| shard7, | ||
| block_number, | ||
| block_number, | ||
| hash | ||
| ), | ||
| Error::<Test>::InvalidNextFinalizationCandidateBlockNumber, | ||
| ); | ||
| }) | ||
| } |
Contributor
There was a problem hiding this comment.
Nice, I am happy you added the test.
OverOrion
pushed a commit
that referenced
this pull request
Nov 11, 2022
* Add validity check to finalization * adjust test * adjust benchmark test Co-authored-by: Gaudenz Kessler <gaudenz.kessler@scs.ch>
clangenb
pushed a commit
that referenced
this pull request
Nov 15, 2022
* Propose every nth block as finality candidate instead of all the blocks (#93) Propose every nth block as finality candidate instead of all the blocks Co-authored-by: Gaudenz Kessler <gaudenz.kessler@scs.ch> * Add validity check to finalization (#111) * Add validity check to finalization * adjust test * adjust benchmark test Co-authored-by: Gaudenz Kessler <gaudenz.kessler@scs.ch> * fixup! Propose every nth block as finality candidate instead of all the blocks (#93) Co-authored-by: gaudenzkessler <92718752+gaudenzkessler@users.noreply.github.com> Co-authored-by: Gaudenz Kessler <gaudenz.kessler@scs.ch>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.