From a501d1dae154558cb05fb21638c776fa1dc7f16d Mon Sep 17 00:00:00 2001 From: MiniFrenchBread <103425574+MiniFrenchBread@users.noreply.github.com> Date: Thu, 16 May 2024 23:46:12 +0800 Subject: [PATCH] fix: da signers begin block --- x/dasigners/v1/keeper/abci.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/dasigners/v1/keeper/abci.go b/x/dasigners/v1/keeper/abci.go index 121a4492..d80a80d6 100644 --- a/x/dasigners/v1/keeper/abci.go +++ b/x/dasigners/v1/keeper/abci.go @@ -73,7 +73,7 @@ func (k Keeper) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { Quorums: make([]*types.Quorum, 0), } if len(ballots) >= int(params.EncodedSlices) { - for i := 0; i+int(params.EncodedSlices) < len(ballots); i += 1 { + for i := 0; i+int(params.EncodedSlices) <= len(ballots); i += int(params.EncodedSlices) { if int(params.MaxQuorums) < len(quorums.Quorums) { break } @@ -85,7 +85,7 @@ func (k Keeper) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { } quorums.Quorums = append(quorums.Quorums, &quorum) } - if len(ballots)%int(params.EncodedSlices) != 0 && int(params.MaxQuorums) < len(quorums.Quorums) { + if len(ballots)%int(params.EncodedSlices) != 0 && int(params.MaxQuorums) > len(quorums.Quorums) { quorum := types.Quorum{ Signers: make([]string, 0), }