Documentation ¶
Index ¶
- Constants
- Variables
- func AdvanceBlock(ctx context.Context, ks *Keepers, customBlockTime ...time.Duration) context.Context
- func AdvanceBlocks(ctx context.Context, ks *Keepers, blocks int, customBlockTime ...time.Duration) context.Context
- func AdvanceEpoch(ctx context.Context, ks *Keepers, customBlockTime ...time.Duration) context.Context
- func AdvanceToBlock(ctx context.Context, ks *Keepers, block uint64, ...) context.Context
- func ConflictKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- func DualstakingKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- func EndBlock(ctx sdk.Context, ks *Keepers)
- func EpochstorageKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- func EpochstorageKeeperWithDB(t testing.TB) (*keeper.Keeper, storetypes.CommitMultiStore, *tmdb.MemDB)
- func GetASpec(specIndex, getToTopMostPath string, ctxArg *sdk.Context, keeper *keeper.Keeper) (specRet spectypes.Spec, err error)
- func InitAllKeepers(t testing.TB) (*Servers, *Keepers, context.Context)
- func NewBlock(ctx sdk.Context, ks *Keepers)
- func PairingKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- func PlanKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- func ProjectsKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- func ProtocolKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- func SimulateParamChange(ctx sdk.Context, paramKeeper paramskeeper.Keeper, subspace, key, value string) (err error)
- func SimulatePlansAddProposal(ctx sdk.Context, plansKeeper planskeeper.Keeper, ...) error
- func SimulatePlansDelProposal(ctx sdk.Context, plansKeeper planskeeper.Keeper, plansToDelete []string) error
- func SimulateSpecAddProposal(ctx sdk.Context, specKeeper speckeeper.Keeper, specsToPropose []spectypes.Spec) error
- func SimulateUnstakeProposal(ctx sdk.Context, pairingKeeper pairingkeeper.Keeper, ...) error
- func SpecKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- func SubscriptionKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- type KeeperBeginBlocker
- type KeeperEndBlocker
- type Keepers
- type MockBlockStore
- func (b *MockBlockStore) AdvanceBlock(blockTime time.Duration)
- func (b *MockBlockStore) Base() int64
- func (b *MockBlockStore) DeleteLatestBlock() error
- func (b *MockBlockStore) Height() int64
- func (b *MockBlockStore) LoadBaseMeta() *tenderminttypes.BlockMeta
- func (b *MockBlockStore) LoadBlock(height int64) *tenderminttypes.Block
- func (b *MockBlockStore) LoadBlockByHash(hash []byte) *tenderminttypes.Block
- func (b *MockBlockStore) LoadBlockCommit(height int64) *tenderminttypes.Commit
- func (b *MockBlockStore) LoadBlockMeta(height int64) *tenderminttypes.BlockMeta
- func (b *MockBlockStore) LoadBlockMetaByHash(hash []byte) *tenderminttypes.BlockMeta
- func (b *MockBlockStore) LoadBlockPart(height int64, index int) *tenderminttypes.Part
- func (b *MockBlockStore) LoadSeenCommit(height int64) *tenderminttypes.Commit
- func (b *MockBlockStore) PruneBlocks(height int64) (uint64, error)
- func (b *MockBlockStore) SaveBlock(block *tenderminttypes.Block, blockParts *tenderminttypes.PartSet, ...)
- func (b *MockBlockStore) SetBlockHistoryEntry(height int64, blockCore *tenderminttypes.Block)
- func (b *MockBlockStore) SetHeight(height int64)
- func (b *MockBlockStore) Size() int64
- type Servers
Constants ¶
View Source
const ( BLOCK_TIME = 30 * time.Second BLOCK_HEADER_LEN = 32 )
Variables ¶
View Source
var Randomizer *sigs.ZeroReader
Functions ¶
func AdvanceBlock ¶
func AdvanceBlocks ¶
func AdvanceEpoch ¶
func AdvanceEpoch(ctx context.Context, ks *Keepers, customBlockTime ...time.Duration) context.Context
Make sure you save the new context
func AdvanceToBlock ¶
func EpochstorageKeeperWithDB ¶
func EpochstorageKeeperWithDB(t testing.TB) (*keeper.Keeper, storetypes.CommitMultiStore, *tmdb.MemDB)
func SimulateParamChange ¶
func SimulatePlansAddProposal ¶
func SimulatePlansAddProposal(ctx sdk.Context, plansKeeper planskeeper.Keeper, plansToPropose []planstypes.Plan, modify bool) error
func SimulateSpecAddProposal ¶
func SimulateUnstakeProposal ¶
func SimulateUnstakeProposal(ctx sdk.Context, pairingKeeper pairingkeeper.Keeper, providersInfo []pairingtypes.ProviderUnstakeInfo) error
Types ¶
type KeeperBeginBlocker ¶
type KeeperEndBlocker ¶
type Keepers ¶
type Keepers struct { TimerStoreKeeper *timerstorekeeper.Keeper FixationStoreKeeper *fixationkeeper.Keeper AccountKeeper mockAccountKeeper BankKeeper mockBankKeeper StakingKeeper stakingkeeper.Keeper Spec speckeeper.Keeper Epochstorage epochstoragekeeper.Keeper Dualstaking dualstakingkeeper.Keeper Subscription subscriptionkeeper.Keeper Conflict conflictkeeper.Keeper Pairing pairingkeeper.Keeper Projects projectskeeper.Keeper Plans planskeeper.Keeper Protocol protocolkeeper.Keeper ParamsKeeper paramskeeper.Keeper BlockStore MockBlockStore Downtime downtimekeeper.Keeper SlashingKeeper slashingkeeper.Keeper }
NOTE: the order of the keeper fields must follow that of calling app.mm.SetOrderBeginBlockers() in app/app.go
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) DeleteLatestBlock ¶
func (b *MockBlockStore) DeleteLatestBlock() error
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) LoadBlockMetaByHash ¶
func (b *MockBlockStore) LoadBlockMetaByHash(hash []byte) *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 { StakingServer stakingtypes.MsgServer EpochServer epochstoragetypes.MsgServer SpecServer spectypes.MsgServer PairingServer pairingtypes.MsgServer ConflictServer conflicttypes.MsgServer ProjectServer projectstypes.MsgServer ProtocolServer protocoltypes.MsgServer SubscriptionServer subscriptiontypes.MsgServer DualstakingServer dualstakingtypes.MsgServer PlansServer planstypes.MsgServer SlashingServer slashingtypes.MsgServer }
Click to show internal directories.
Click to hide internal directories.