mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-24 15:25:18 +00:00
chore: add logs, fix EpochBlocks
This commit is contained in:
parent
645729fa89
commit
8e433c1557
@ -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
|
||||
}
|
||||
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user