func CheckAccountInfo(t *testing.T, accountName string, lb *app.LinoBlockchain, expectInfo accmodel.AccountInfo) {
	ctx := lb.BaseApp.NewContext(true, abci.Header{ChainID: "Lino", Time: time.Unix(0, 0)})
	ph := param.NewParamHolder(lb.CapKeyParamStore)
	accManager := accmn.NewAccountManager(lb.CapKeyAccountStore, ph)
	info, err := accManager.GetInfo(ctx, types.AccountKey(accountName))
	assert.Nil(t, err)
	assert.Equal(t, expectInfo, *info)
}
CheckAccountInfo - check account balance
package test
import (
	"encoding/json"
	"os"
	"strconv"
	"testing"
	"time"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	"github.com/lino-network/lino/app"
	"github.com/lino-network/lino/param"
	"github.com/lino-network/lino/types"
	accmn "github.com/lino-network/lino/x/account/manager"
	accmodel "github.com/lino-network/lino/x/account/model"
	acctypes "github.com/lino-network/lino/x/account/types"
	bandwidthmn "github.com/lino-network/lino/x/bandwidth/manager"
	bandwidthmodel "github.com/lino-network/lino/x/bandwidth/model"
	"github.com/lino-network/lino/x/post"
	valmodel "github.com/lino-network/lino/x/validator/model"
	wire "github.com/cosmos/cosmos-sdk/codec"
	sdk "github.com/cosmos/cosmos-sdk/types"
	"github.com/cosmos/cosmos-sdk/x/auth"
	abci "github.com/tendermint/tendermint/abci/types"
	"github.com/tendermint/tendermint/crypto/secp256k1"
	"github.com/tendermint/tendermint/libs/log"
	dbm "github.com/tendermint/tm-db"
)
var (
	GenesisUser            = "genesis"
	GenesisPriv            = secp256k1.GenPrivKey()
	GenesisTransactionPriv = secp256k1.GenPrivKey()
	GenesisAppPriv         = secp256k1.GenPrivKey()
	GenesisAddr            = GenesisPriv.PubKey().Address()
	DefaultNumOfVal  = 22
	GenesisTotalCoin = types.NewCoinFromInt64(10000000000 * types.Decimals)
	CoinPerValidator = types.NewCoinFromInt64(100000000 * types.Decimals)
	PenaltyMissVote       = types.NewCoinFromInt64(20000 * types.Decimals)
	ChangeParamMinDeposit = types.NewCoinFromInt64(100000 * types.Decimals)
	ProposalDecideSec            int64 = 24 * 7 * 3600
	ParamChangeExecutionSec      int64 = 24 * 3600
	CoinReturnIntervalSec        int64 = 24 * 7 * 3600
	CoinReturnTimes              int64 = 7
	ConsumptionFrictionRate            = types.NewDecFromRat(5, 100)
	ConsumptionFreezingPeriodSec int64 = 24 * 7 * 3600
	PostIntervalSec              int64 = 600
)
func loggerAndDB() (log.Logger, dbm.DB) {
	logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app")
	db := dbm.NewMemDB()
	return logger, db
}
func NewTestLinoBlockchain(t *testing.T, numOfValidators int, beginBlockTime time.Time) *app.LinoBlockchain {
	logger, db := loggerAndDB()
	lb := app.NewLinoBlockchain(logger, db, nil)
	genesisState := app.GenesisState{
		GenesisPools: app.GenesisPools{
			Pools: []app.GenesisPool{
				{Name: types.InflationDeveloperPool},
				{Name: types.InflationValidatorPool},
				{Name: types.InflationConsumptionPool},
				{Name: types.VoteStakeInPool},
				{Name: types.VoteStakeReturnPool},
				{Name: types.VoteFrictionPool},
				{
					Name: types.DevIDAReservePool,
				},
				{
					Name:   types.AccountVestingPool,
					Amount: GenesisTotalCoin,
				},
			},
			Total: GenesisTotalCoin,
		},
		InitCoinPrice: types.NewMiniDollar(1200),
		Accounts:      []app.GenesisAccount{},
	}
	for i := 0; i < numOfValidators; i++ {
		genesisAcc := app.GenesisAccount{
			Name:        "validator" + strconv.Itoa(i),
			Coin:        CoinPerValidator,
			TxKey:       secp256k1.GenPrivKey().PubKey(),
			SignKey:     secp256k1.GenPrivKey().PubKey(),
			IsValidator: true,
			ValPubKey:   secp256k1.GenPrivKey().PubKey(),
		}
		genesisState.Accounts = append(genesisState.Accounts, genesisAcc)
	}
	initLNO := GetGenesisAccountCoin(numOfValidators)
	genesisAcc := app.GenesisAccount{
		Name:        GenesisUser,
		Coin:        initLNO,
		TxKey:       GenesisPriv.PubKey(),
		SignKey:     GenesisTransactionPriv.PubKey(),
		IsValidator: false,
		ValPubKey:   GenesisPriv.PubKey(),
	}
	cdc := app.MakeCodec()
	genesisState.Accounts = append(genesisState.Accounts, genesisAcc)
	result, err := wire.MarshalJSONIndent(cdc, genesisState)
	assert.Nil(t, err)
	lb.InitChain(abci.RequestInitChain{
		Time: beginBlockTime, ChainId: "Lino", AppStateBytes: json.RawMessage(result)})
	lb.BeginBlock(abci.RequestBeginBlock{
		Header: abci.Header{Height: 1, ChainID: "Lino", Time: beginBlockTime}})
	lb.EndBlock(abci.RequestEndBlock{})
	lb.Commit()
	bandwidthmn.BandwidthManagerTestMode = true
	return lb
}
func CheckGlobalAllocation(t *testing.T, lb *app.LinoBlockchain, expectAllocation param.GlobalAllocationParam) {
	ctx := lb.BaseApp.NewContext(true, abci.Header{ChainID: "Lino", Time: time.Unix(0, 0)})
	ph := param.NewParamHolder(lb.CapKeyParamStore)
	allocation := ph.GetGlobalAllocationParam(ctx)
	assert.Equal(t, expectAllocation, *allocation)
}
func CheckBalance(t *testing.T, accountName string, lb *app.LinoBlockchain, expectBalance types.Coin) {
	ctx := lb.BaseApp.NewContext(true, abci.Header{ChainID: "Lino", Time: time.Unix(0, 0)})
	ph := param.NewParamHolder(lb.CapKeyParamStore)
	accManager := accmn.NewAccountManager(lb.CapKeyAccountStore, ph)
	saving, err := accManager.GetSavingFromUsername(ctx, types.AccountKey(accountName))
	assert.Nil(t, err)
	assert.Equal(t, expectBalance.Amount.Int64(), saving.Amount.Int64())
}