diff --git a/keeper/abci.go b/keeper/abci.go index a5a960a..b49dca8 100644 --- a/keeper/abci.go +++ b/keeper/abci.go @@ -199,6 +199,8 @@ func (h *ProofOfBlobProposalHandler) aggregateVotes(ctx sdk.Context, ci abci.Ext totalVoting := 0 for _, v := range ci.Votes { + totalVoting += int(v.Validator.Power) + // Process only votes with BlockIDFlagCommit, indicating the validator committed to the block. // Skip votes with other flags (e.g., BlockIDFlagUnknown, BlockIDFlagNil). if v.BlockIdFlag != cmtproto.BlockIDFlagCommit { @@ -215,10 +217,7 @@ func (h *ProofOfBlobProposalHandler) aggregateVotes(ctx sdk.Context, ci abci.Ext continue } - currentTotalVoting := 0 for voteRange, isVoted := range voteExt.Votes { - - currentTotalVoting += int(v.Validator.Power) if voteRange != pendingRangeKey || !isVoted { continue } @@ -226,8 +225,6 @@ func (h *ProofOfBlobProposalHandler) aggregateVotes(ctx sdk.Context, ci abci.Ext votes[voteRange] += v.Validator.Power } - totalVoting = max(totalVoting, currentTotalVoting) - } return votes, int64(totalVoting), nil }