-
Notifications
You must be signed in to change notification settings - Fork 205
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
adapt integration tests for consensus v2 #6685
Changes from 1 commit
6ecd517
5c42932
30f6c12
4a4f9b2
e9ec8bf
c7c2154
27a42c9
528d092
6f29b71
e45434e
bba0165
06ff80e
22598c3
1451498
9f6e666
ad69364
8b53a28
1887e15
c21a678
84b2255
2893cf2
0ef4c06
92c1f0b
a32849b
22edddc
2716384
8a3ca7a
e5eb36a
14e6645
ecbb55f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -437,7 +437,7 @@ func (mp *metaProcessor) checkProofsForShardData(header *block.MetaBlock) error | |
continue | ||
} | ||
|
||
if !mp.proofsPool.HasProof(shardData.ShardID, shardData.HeaderHash) { | ||
if !mp.proofsPool.HasProof(shardData.ShardID, shardData.HeaderHash) && shardData.GetNonce() > 1 { | ||
return fmt.Errorf("%w for header hash %s", process.ErrMissingHeaderProof, hex.EncodeToString(shardData.HeaderHash)) | ||
} | ||
|
||
|
@@ -2234,7 +2234,7 @@ func (mp *metaProcessor) createShardInfo() ([]data.ShardDataHandler, error) { | |
} | ||
|
||
isBlockAfterEquivalentMessagesFlag := !check.IfNil(headerInfo.hdr) && | ||
mp.enableEpochsHandler.IsFlagEnabledInEpoch(common.EquivalentMessagesFlag, headerInfo.hdr.GetEpoch()) | ||
mp.enableEpochsHandler.IsFlagEnabledInEpoch(common.EquivalentMessagesFlag, headerInfo.hdr.GetEpoch()) && headerInfo.hdr.GetNonce() > 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added this for genesis block; it is helpful mainly for integration tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can discuss if we really want this approach |
||
hasMissingShardHdrProof := isBlockAfterEquivalentMessagesFlag && !mp.proofsPool.HasProof(headerInfo.hdr.GetShardID(), []byte(hdrHash)) | ||
if hasMissingShardHdrProof { | ||
return nil, fmt.Errorf("%w for shard header with hash %s", process.ErrMissingHeaderProof, hex.EncodeToString([]byte(hdrHash))) | ||
|
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 this should stay as before, as we check the proof for header, not the prev proof
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.
yes, it should be the previous check proof for header not prev proof.
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.
reverted + added check for genesis block (this is needed mainly for integration tests)