Skip to content
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

fix two bugs that regarding verifying shard_id #8977

Merged
merged 2 commits into from
Apr 26, 2023
Merged

fix two bugs that regarding verifying shard_id #8977

merged 2 commits into from
Apr 26, 2023

Conversation

mzhangmzz
Copy link
Contributor

No description provided.

@mzhangmzz mzhangmzz requested a review from a team as a code owner April 26, 2023 13:31
@@ -1107,6 +1107,9 @@ impl Chain {
byzantine_assert!(false);
return Err(Error::InvalidChunk);
}
if chunk_header.shard_id() != shard_id as ShardId {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider ShardId::from(shard_id). Or ShardId::try_from(shard_id) with appropriate handling.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix it in a follow up PR. I need to add tests for this PR later. We needed to merge it asap for the release.

@mzhangmzz mzhangmzz merged commit 8c1b0df into master Apr 26, 2023
@mzhangmzz mzhangmzz deleted the temp_fix branch April 26, 2023 14:11
nikurt pushed a commit that referenced this pull request Apr 28, 2023
Co-authored-by: Bowen Wang <bowenwang1996@users.noreply.github.com>
near-bulldozer bot pushed a commit that referenced this pull request May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants