From 8e433c1557e1ed67ff0e3c74791c6dfe1fbc6e98 Mon Sep 17 00:00:00 2001 From: MiniFrenchBread <103425574+MiniFrenchBread@users.noreply.github.com> Date: Sat, 10 Aug 2024 10:14:18 +0800 Subject: [PATCH] chore: add logs, fix EpochBlocks --- x/dasigners/v1/keeper/abci.go | 3 +++ x/dasigners/v1/types/genesis.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/x/dasigners/v1/keeper/abci.go b/x/dasigners/v1/keeper/abci.go index a749ad66..32d41d89 100644 --- a/x/dasigners/v1/keeper/abci.go +++ b/x/dasigners/v1/keeper/abci.go @@ -2,6 +2,7 @@ package keeper import ( "bytes" + "fmt" "math/big" "sort" @@ -33,6 +34,7 @@ func (k Keeper) generateOneEpoch(ctx sdk.Context) bool { } expectedEpoch = epochNumber + 1 // new epoch + k.Logger(ctx).Info(fmt.Sprintf("[BeginBlock] generating epoch %v", expectedEpoch)) registrations := []Ballot{} k.IterateRegistrations(ctx, expectedEpoch, func(account string, signature []byte) (stop bool) { registrations = append(registrations, Ballot{ @@ -108,6 +110,7 @@ func (k Keeper) generateOneEpoch(ctx sdk.Context) bool { // save to store k.SetEpochQuorums(ctx, expectedEpoch, quorums) k.SetEpochNumber(ctx, expectedEpoch) + k.Logger(ctx).Info(fmt.Sprintf("[BeginBlock] epoch %v generated, with %v quorums", expectedEpoch, len(quorums.Quorums))) return true } diff --git a/x/dasigners/v1/types/genesis.go b/x/dasigners/v1/types/genesis.go index 789f7042..0515758d 100644 --- a/x/dasigners/v1/types/genesis.go +++ b/x/dasigners/v1/types/genesis.go @@ -18,7 +18,7 @@ func DefaultGenesisState() *GenesisState { TokensPerVote: 10, MaxVotesPerSigner: 1024, MaxQuorums: 10, - EpochBlocks: 2, + EpochBlocks: 5760, EncodedSlices: 3072, }, 0, make([]*Signer, 0), []*Quorums{{ Quorums: make([]*Quorum, 0),