Documentation ¶
Index ¶
- Constants
- 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 EpochstorageKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- func EpochstorageKeeperWithDB(t testing.TB) (*keeper.Keeper, storetypes.CommitMultiStore, *tmdb.MemDB)
- func InitAllKeepers(t testing.TB) (*Servers, *Keepers, context.Context)
- func NewBlock(ctx context.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 SimulateParamChange(ctx sdk.Context, paramKeeper paramskeeper.Keeper, subspace string, key string, ...) (err error)
- func SimulatePlansProposal(ctx sdk.Context, plansKeeper planskeeper.Keeper, ...) error
- func SpecKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- func SubscriptionKeeper(t testing.TB) (*keeper.Keeper, sdk.Context)
- type Keepers
- type MockBlockStore
- func (b *MockBlockStore) AdvanceBlock(blockTime time.Duration)
- func (b *MockBlockStore) Base() int64
- 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) 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_HEADER_LEN = 32
View Source
const (
BLOCK_TIME = 30 * time.Second
)
Variables ¶
This section is empty.
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 SimulatePlansProposal ¶ added in v0.7.0
func SimulatePlansProposal(ctx sdk.Context, plansKeeper planskeeper.Keeper, plansToPropose []planstypes.Plan) error
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 }
Click to show internal directories.
Click to hide internal directories.