-
Notifications
You must be signed in to change notification settings - Fork 1k
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 #1834 #1838
Fix #1834 #1838
Conversation
|
Yes, it's better, but the consensus UT use -1, we can fix the UT and change to uint |
The problem is that ConsensusService use Blockchain.Singleton and it has 1 Height. So it can't meet this UT neo/tests/neo.UnitTests/Consensus/UT_Consensus.cs Lines 169 to 180 in ca13358
|
I think that now it's better, because if |
Test need to be fixed. |
* Fix 1834 * Fix UT * Remove useless condition Co-authored-by: Erik Zhang <erik@neo.org>
We need to ensure that all the indexes can fit in LastSeenMessage, if we use a integer type, we have the half available chain.
Also, if heigh it's 0,
LastSeenMessage?.Count(p => Block.Index > 0 && p.Value < (Block.Index - 1)) ?? 0;
it will produce an integer overflow, and the condition always will be true.