-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Start a CN and normal node.
- Register all standby committee as candidate and the original validator as candidate too.
- Register another account test1.json as candidate and vote him with 20000000 votes.
- After generating another two blocks. consensus node show error.
Expected behavior
It should not show error but show role=WatchOnly.
Platform:
- OS: Windows 10 x64
- Version master branch, Neo-VM
Root Cause Analysis:
public void Reset(byte viewNumber)
{
if (viewNumber == 0)
{
Snapshot?.Dispose();
Snapshot = Blockchain.Singleton.GetSnapshot();
Block = new Block
{
PrevHash = Snapshot.CurrentBlockHash,
Index = Snapshot.Height + 1,
NextConsensus = Blockchain.GetConsensusAddress(NativeContract.NEO.ComputeNextBlockValidators(Snapshot))
};
var pv = Validators;
Validators = NativeContract.NEO.GetNextBlockValidators(Snapshot);
if (_witnessSize == 0 || (pv != null && pv.Length != Validators.Length))
{It was caused by ComputeNextBlockValidators get the new update key, GetNextBlockValidators still get the original validators.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
