mirror of
https://github.com/0glabs/0g-chain.git
synced 2025-01-13 08:45:18 +00:00
test: remove manually initialize genesis
This commit is contained in:
parent
27a722c855
commit
c0e9f28582
@ -3,7 +3,6 @@ package keeper_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/0glabs/0g-chain/x/dasigners/v1"
|
||||
"github.com/0glabs/0g-chain/x/dasigners/v1/keeper"
|
||||
"github.com/0glabs/0g-chain/x/dasigners/v1/testutil"
|
||||
"github.com/0glabs/0g-chain/x/dasigners/v1/types"
|
||||
@ -19,8 +18,9 @@ type AbciTestSuite struct {
|
||||
|
||||
func (suite *AbciTestSuite) TestBeginBlock_NotContinuous() {
|
||||
// suite.App.InitializeFromGenesisStates()
|
||||
dasigners.InitGenesis(suite.Ctx, suite.Keeper, *types.DefaultGenesisState())
|
||||
// dasigners.InitGenesis(suite.Ctx, suite.Keeper, *types.DefaultGenesisState())
|
||||
params := suite.Keeper.GetParams(suite.Ctx)
|
||||
suite.Assert().EqualValues(params, types.DefaultGenesisState().Params)
|
||||
suite.Require().Panics(func() {
|
||||
suite.Keeper.BeginBlock(suite.Ctx.WithBlockHeight(int64(params.EpochBlocks*2)), abci.RequestBeginBlock{})
|
||||
}, "block height is not continuous")
|
||||
@ -28,7 +28,7 @@ func (suite *AbciTestSuite) TestBeginBlock_NotContinuous() {
|
||||
|
||||
func (suite *AbciTestSuite) TestBeginBlock_Success() {
|
||||
// suite.App.InitializeFromGenesisStates()
|
||||
dasigners.InitGenesis(suite.Ctx, suite.Keeper, *types.DefaultGenesisState())
|
||||
// dasigners.InitGenesis(suite.Ctx, suite.Keeper, *types.DefaultGenesisState())
|
||||
suite.Keeper.SetParams(suite.Ctx, types.Params{
|
||||
TokensPerVote: 10,
|
||||
MaxVotesPerSigner: 200,
|
||||
|
@ -7,7 +7,6 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/0glabs/0g-chain/crypto/bn254util"
|
||||
"github.com/0glabs/0g-chain/x/dasigners/v1"
|
||||
"github.com/0glabs/0g-chain/x/dasigners/v1/keeper"
|
||||
"github.com/0glabs/0g-chain/x/dasigners/v1/testutil"
|
||||
"github.com/0glabs/0g-chain/x/dasigners/v1/types"
|
||||
@ -312,7 +311,7 @@ func (suite *KeeperTestSuite) queryAggregatePubkeyG1(params types.Params) {
|
||||
|
||||
func (suite *KeeperTestSuite) Test_Keeper() {
|
||||
// suite.App.InitializeFromGenesisStates()
|
||||
dasigners.InitGenesis(suite.Ctx, suite.Keeper, *types.DefaultGenesisState())
|
||||
// dasigners.InitGenesis(suite.Ctx, suite.Keeper, *types.DefaultGenesisState())
|
||||
// add delegation
|
||||
params := suite.Keeper.GetParams(suite.Ctx)
|
||||
suite.AddDelegation(signer1, signer1, keeper.BondedConversionRate.Mul(sdk.NewIntFromUint64(params.TokensPerVote)))
|
||||
|
Loading…
Reference in New Issue
Block a user