File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
consensus/XDPoS/engines/engine_v2 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ func (x *XDPoS_v2) voteHandler(chain consensus.ChainReader, voteMsg *types.Vote)
7676 go x .ForensicsProcessor .DetectEquivocationInVotePool (voteMsg , x .votePool )
7777 go x .ForensicsProcessor .ProcessVoteEquivocation (chain , x , voteMsg )
7878
79- epochInfo , err := x .getEpochSwitchInfo (chain , chain . CurrentHeader (), chain . CurrentHeader () .Hash () )
79+ epochInfo , err := x .getEpochSwitchInfo (chain , nil , voteMsg . ProposedBlockInfo .Hash )
8080 if err != nil {
8181 log .Error ("[voteHandler] Error when getting epoch switch Info" , "error" , err )
8282 return errors .New ("fail on voteHandler due to failure in getting epoch switch info" )
@@ -175,7 +175,7 @@ func (x *XDPoS_v2) onVotePoolThresholdReached(chain consensus.ChainReader, poole
175175 }
176176 }
177177
178- epochInfo , err := x .getEpochSwitchInfo (chain , chain . CurrentHeader (), chain . CurrentHeader (). Hash () )
178+ epochInfo , err := x .getEpochSwitchInfo (chain , nil , currentVoteMsg .( * types. Vote ). ProposedBlockInfo . Hash )
179179 if err != nil {
180180 log .Error ("[voteHandler] Error when getting epoch switch Info" , "error" , err )
181181 return errors .New ("fail on voteHandler due to failure in getting epoch switch info" )
You can’t perform that action at this time.
0 commit comments