keeper

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const BLOCK_HEADER_LEN = 32
View Source
const (
	BLOCK_TIME = 30 * time.Second
)

Variables

This section is empty.

Functions

func AdvanceBlock

func AdvanceBlock(ctx context.Context, ks *Keepers, customBlockTime ...time.Duration) context.Context

func AdvanceBlocks

func AdvanceBlocks(ctx context.Context, ks *Keepers, blocks int, customBlockTime ...time.Duration) context.Context

func AdvanceEpoch

func AdvanceEpoch(ctx context.Context, ks *Keepers, customBlockTime ...time.Duration) context.Context

Make sure you save the new context

func AdvanceToBlock

func AdvanceToBlock(ctx context.Context, ks *Keepers, block uint64, customBlockTime ...time.Duration) context.Context

func ConflictKeeper

func ConflictKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)

func EpochstorageKeeper

func EpochstorageKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)

func EpochstorageKeeperWithDB

func EpochstorageKeeperWithDB(t testing.TB) (*keeper.Keeper, storetypes.CommitMultiStore, *tmdb.MemDB)

func InitAllKeepers

func InitAllKeepers(t testing.TB) (*Servers, *Keepers, context.Context)

func NewBlock

func NewBlock(ctx context.Context, ks *Keepers)

Make sure you save the new context

func PairingKeeper

func PairingKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)

func PlanKeeper

func PlanKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)

func ProjectsKeeper

func ProjectsKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)

func SimulateParamChange

func SimulateParamChange(ctx sdk.Context, paramKeeper paramskeeper.Keeper, subspace string, key string, value string) (err error)

func SimulatePlansProposal added in v0.7.0

func SimulatePlansProposal(ctx sdk.Context, plansKeeper planskeeper.Keeper, plansToPropose []planstypes.Plan) error

func SpecKeeper

func SpecKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)

func SubscriptionKeeper

func SubscriptionKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)

Types

type Keepers

type Keepers struct {
	Epochstorage  epochstoragekeeper.Keeper
	Spec          speckeeper.Keeper
	Plans         planskeeper.Keeper
	Projects      projectskeeper.Keeper
	Subscription  subscriptionkeeper.Keeper
	Pairing       pairingkeeper.Keeper
	Conflict      conflictkeeper.Keeper
	BankKeeper    mockBankKeeper
	AccountKeeper mockAccountKeeper
	ParamsKeeper  paramskeeper.Keeper
	BlockStore    MockBlockStore
}

type MockBlockStore

type MockBlockStore struct {
	// contains filtered or unexported fields
}

func (*MockBlockStore) AdvanceBlock

func (b *MockBlockStore) AdvanceBlock(blockTime time.Duration)

func (*MockBlockStore) Base

func (b *MockBlockStore) Base() int64

func (*MockBlockStore) Height

func (b *MockBlockStore) Height() int64

func (*MockBlockStore) LoadBaseMeta

func (b *MockBlockStore) LoadBaseMeta() *tenderminttypes.BlockMeta

func (*MockBlockStore) LoadBlock

func (b *MockBlockStore) LoadBlock(height int64) *tenderminttypes.Block

func (*MockBlockStore) LoadBlockByHash

func (b *MockBlockStore) LoadBlockByHash(hash []byte) *tenderminttypes.Block

func (*MockBlockStore) LoadBlockCommit

func (b *MockBlockStore) LoadBlockCommit(height int64) *tenderminttypes.Commit

func (*MockBlockStore) LoadBlockMeta

func (b *MockBlockStore) LoadBlockMeta(height int64) *tenderminttypes.BlockMeta

func (*MockBlockStore) LoadBlockPart

func (b *MockBlockStore) LoadBlockPart(height int64, index int) *tenderminttypes.Part

func (*MockBlockStore) LoadSeenCommit

func (b *MockBlockStore) LoadSeenCommit(height int64) *tenderminttypes.Commit

func (*MockBlockStore) PruneBlocks

func (b *MockBlockStore) PruneBlocks(height int64) (uint64, error)

func (*MockBlockStore) SaveBlock

func (b *MockBlockStore) SaveBlock(block *tenderminttypes.Block, blockParts *tenderminttypes.PartSet, seenCommit *tenderminttypes.Commit)

func (*MockBlockStore) SetBlockHistoryEntry

func (b *MockBlockStore) SetBlockHistoryEntry(height int64, blockCore *tenderminttypes.Block)

func (*MockBlockStore) SetHeight

func (b *MockBlockStore) SetHeight(height int64)

func (*MockBlockStore) Size

func (b *MockBlockStore) Size() int64

type Servers

type Servers struct {
	EpochServer        epochstoragetypes.MsgServer
	SpecServer         spectypes.MsgServer
	PairingServer      pairingtypes.MsgServer
	ConflictServer     conflicttypes.MsgServer
	ProjectServer      projectstypes.MsgServer
	SubscriptionServer subscriptiontypes.MsgServer
	PlansServer        planstypes.MsgServer
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL