Skip to content

Commit

Permalink
init cons params
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Sep 6, 2024
1 parent 2c557ce commit a960b2a
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions block/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
tmcrypto "github.com/tendermint/tendermint/crypto/encoding"
tmstate "github.com/tendermint/tendermint/proto/tendermint/state"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
"github.com/tendermint/tendermint/proxy"
tmtypes "github.com/tendermint/tendermint/types"
"go.uber.org/multierr"
Expand Down Expand Up @@ -63,13 +64,30 @@ func (e *Executor) InitChain(genesis *tmtypes.GenesisDoc, valset []*tmtypes.Vali
})
}

params := genesis.ConsensusParams

return e.proxyAppConsensusConn.InitChainSync(abci.RequestInitChain{
Time: genesis.GenesisTime,
ChainId: genesis.ChainID,
ConsensusParams: &abci.ConsensusParams{},
Validators: valUpdates,
AppStateBytes: genesis.AppState,
InitialHeight: genesis.InitialHeight,
Time: genesis.GenesisTime,
ChainId: genesis.ChainID,
ConsensusParams: &abci.ConsensusParams{
Block: &abci.BlockParams{
MaxBytes: params.Block.MaxBytes,
MaxGas: params.Block.MaxGas,
},
Evidence: &tmproto.EvidenceParams{
MaxAgeNumBlocks: params.Evidence.MaxAgeNumBlocks,
MaxAgeDuration: params.Evidence.MaxAgeDuration,
MaxBytes: params.Evidence.MaxBytes,
},
Validator: &tmproto.ValidatorParams{
PubKeyTypes: params.Validator.PubKeyTypes,
},
Version: &tmproto.VersionParams{
AppVersion: params.Version.AppVersion,
},
}, Validators: valUpdates,
AppStateBytes: genesis.AppState,
InitialHeight: genesis.InitialHeight,
})
}

Expand Down

0 comments on commit a960b2a

Please sign in to comment.