//remove fail, set the preMainBlockHash to nil, to match nothing, force to search again
//remove fail, the para chain may be remove part, set the preMainBlockHash to nil, to match nothing, force to search from last
err=client.removeBlocks(height)
err=client.removeBlocks(height)
iferr!=nil{
iferr!=nil{
*preMainBlockHash=nil
returncurrSeq,nil,nil
return
}
}
*currSeq=mainSeq+1
plog.Info("switchHashMatchedBlock succ","currHeight",height,"initHeight",lastBlock.Height,"set new currSeq",currSeq,"new preMainBlockHash",common.Bytes2Hex(preMainBlockHash))
*preMainBlockHash=miner.MainBlockHash
returnmainSeq+1,miner.MainBlockHash,nil
plog.Info("switchHashMatchedBlock succ","currHeight",height,"initHeight",lastBlock.Height,"set new currSeq",*currSeq,"new preMainBlockHash",common.Bytes2Hex(*preMainBlockHash))