@@ -355,7 +355,7 @@ func (sk *StakingPlugin) CreateCandidate(state xcom.StateDB, blockHash common.Ha
355355 return nil
356356}
357357
358- /// This method may only be called when creatStaking
358+ // / This method may only be called when creatStaking
359359func (sk * StakingPlugin ) RollBackStaking (state xcom.StateDB , blockHash common.Hash , blockNumber * big.Int ,
360360 addr common.NodeAddress , typ uint16 ) error {
361361
@@ -2949,9 +2949,10 @@ func vrfElection(validatorList staking.ValidatorQueue, shiftLen int, nonce []byt
29492949 return nil , err
29502950 }
29512951 if len (preNonces ) < len (validatorList ) {
2952- log .Error ("Failed to vrfElection on Election" , "blockNumber" , blockNumber , "validatorListSize" , len (validatorList ),
2953- "nonceSize" , len (nonce ), "preNoncesSize" , len (preNonces ), "parentHash" , hex .EncodeToString (parentHash .Bytes ()))
2954- return nil , staking .ErrWrongFuncParams
2952+ validatorList = validatorList [:len (preNonces )]
2953+ //log.Error("Failed to vrfElection on Election", "blockNumber", blockNumber, "validatorListSize", len(validatorList),
2954+ // "nonceSize", len(nonce), "preNoncesSize", len(preNonces), "parentHash", hex.EncodeToString(parentHash.Bytes()))
2955+ //return nil, staking.ErrWrongFuncParams
29552956 }
29562957 if len (preNonces ) > len (validatorList ) {
29572958 preNonces = preNonces [len (preNonces )- len (validatorList ):]
0 commit comments