Skip to content

Commit

Permalink
fix initial auto increment values
Browse files Browse the repository at this point in the history
  • Loading branch information
kstoykov committed Nov 8, 2021
1 parent d878f1e commit d481c8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions module/x/gravity/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

// InitGenesis starts a chain from a genesis state
func InitGenesis(ctx sdk.Context, k Keeper, data types.GenesisState) {
var lastTxPoolId uint64 = 1
var lastBatchNonce uint64 = 1
var lastTxPoolId uint64 = 0
var lastBatchNonce uint64 = 0

k.SetParams(ctx, *data.Params)
// reset valsets in state
Expand Down Expand Up @@ -39,7 +39,7 @@ func InitGenesis(ctx sdk.Context, k Keeper, data types.GenesisState) {
}
}
}
k.setIncrementID(ctx, types.KeyLastOutgoingBatchID, lastTxPoolId+1)
k.setIncrementID(ctx, types.KeyLastOutgoingBatchID, lastBatchNonce+1)

// reset batch confirmations in state
for _, conf := range data.BatchConfirms {
Expand Down

0 comments on commit d481c8a

Please sign in to comment.