This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 371
Reject blocks without justification which don't have the best number #105
Merged
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ae3ce09
Initial commit
cecton ee60e12
Reject blocks without justification
cecton 5bb6082
Revert "Reject blocks without justification"
cecton bf53b31
WIP
cecton 86b8403
WIP
cecton 2cac26a
WIP
cecton c2a063a
CLEANUP
cecton 36fc71a
WIP
cecton a86bfdd
WIP
cecton 452586e
CLEANUP
cecton d92acd6
WIP
cecton 615e949
WIP
cecton 3a4a6ba
Move HeadData to primitives
cecton 36ecce0
Update network/src/lib.rs
cecton 4b022b1
Update network/src/lib.rs
cecton 8bccf15
CLEANUP
cecton 65c571b
fix
cecton 3b3bf98
CLEANUP
cecton 2f9131c
messages
cecton a5bc4bd
for the greater good
cecton eb6103b
Update primitives/src/lib.rs
cecton b33c2ba
Update network/src/lib.rs
cecton 1394c70
Update network/src/lib.rs
cecton 64a3302
Update network/src/lib.rs
cecton 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
WIP
Forked at: 8f02e23 Parent branch: origin/master
- Loading branch information
commit a86bfdd322eb285651eac4b1e881f015b59f9ce6
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -86,6 +86,35 @@ where | |||||
| header: &B::Header, | ||||||
| mut data: &[u8], | ||||||
| ) -> Result<Validation, Box<dyn std::error::Error + Send>> { | ||||||
| let runtime_api = self.polkadot_client.runtime_api(); | ||||||
| let polkadot_info = self.polkadot_client.info(); | ||||||
|
|
||||||
| if data.is_empty() { | ||||||
| // Check if block is one higher than best | ||||||
| let runtime_api_block_id = BlockId::Hash(polkadot_info.best_hash); | ||||||
| let block_number: <<B as BlockT>::Header as HeaderT>::Number = *header.number(); | ||||||
|
||||||
| let block_number: <<B as BlockT>::Header as HeaderT>::Number = *header.number(); | |
| let block_number = header.number().clone(); |
Contributor
Author
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
cecton marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
cecton marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
cecton marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
cecton marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
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.
You need a justification if this is a new best 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.
like this? 2f9131c