Documentation ¶
Index ¶
- func BuildRelayRequest(ctx context.Context, provider string, contentHash []byte, cuSum uint64, ...) *types.RelaySession
- func BuySubscription(t *testing.T, ctx context.Context, keepers testkeeper.Keepers, ...)
- func CreateMockPlan() plantypes.Plan
- func CreateMockPolicy() plantypes.Policy
- func CreateMockSpec() spectypes.Spec
- func CreateMsgDetectionTest(ctx context.Context, consumer Account, provider0 Account, provider1 Account, ...) (detectionMsg *conflicttypes.MsgDetection, reply1 *types.RelayReply, ...)
- func StakeAccount(t *testing.T, ctx context.Context, keepers testkeeper.Keepers, ...)
- type Account
- type Tester
- func (ts *Tester) Account(name string) (Account, string)
- func (ts *Tester) AddAccount(name string, balance int64) *Tester
- func (ts *Tester) AddPlan(name string, plan planstypes.Plan) *Tester
- func (ts *Tester) AddPolicy(name string, policy planstypes.Policy) *Tester
- func (ts *Tester) AddProjectData(name string, pd projectstypes.ProjectData) *Tester
- func (ts *Tester) AddSpec(name string, spec spectypes.Spec) *Tester
- func (ts *Tester) AdvanceBlock(delta ...time.Duration) *Tester
- func (ts *Tester) AdvanceBlockUntilStale(delta ...time.Duration) *Tester
- func (ts *Tester) AdvanceBlocks(count uint64, delta ...time.Duration) *Tester
- func (ts *Tester) AdvanceEpoch(delta ...time.Duration) *Tester
- func (ts *Tester) AdvanceEpochUntilStale(delta ...time.Duration) *Tester
- func (ts *Tester) AdvanceEpochs(count uint64, delta ...time.Duration) *Tester
- func (ts *Tester) AdvanceMonths(months int) *Tester
- func (ts *Tester) AdvanceMonthsFrom(from time.Time, months int) *Tester
- func (ts *Tester) BlockHeight() uint64
- func (ts *Tester) BlockTime() time.Time
- func (ts *Tester) BlocksToSave() uint64
- func (ts *Tester) FindPlan(index string, block uint64) (planstypes.Plan, bool)
- func (ts *Tester) GetProjectDeveloperData(devkey string, block uint64) (projectstypes.ProtoDeveloperData, error)
- func (ts *Tester) GetProjectForBlock(projectID string, block uint64) (projectstypes.Project, error)
- func (ts *Tester) GetProjectForDeveloper(devkey string, optional ...uint64) (projectstypes.Project, error)
- func (ts *Tester) Plan(name string) planstypes.Plan
- func (ts *Tester) Policy(name string) planstypes.Policy
- func (ts *Tester) ProjectData(name string) projectstypes.ProjectData
- func (ts *Tester) QueryProjectDeveloper(devkey string) (*projectstypes.QueryDeveloperResponse, error)
- func (ts *Tester) QueryProjectInfo(projectID string) (*projectstypes.QueryInfoResponse, error)
- func (ts *Tester) QuerySubscriptionListProjects(subkey string) (*subscriptiontypes.QueryListProjectsResponse, error)
- func (ts *Tester) SetupAccounts(numSub, numAdm, numDev int) *Tester
- func (ts *Tester) Spec(name string) spectypes.Spec
- func (ts *Tester) TxProposalAddPlans(plans ...planstypes.Plan) error
- func (ts *Tester) TxProposalAddSpecs(specs ...spectypes.Spec) error
- func (ts *Tester) TxProposalDelPlans(indices ...string) error
- func (ts *Tester) TxSubscriptionAddProject(creator string, pd projectstypes.ProjectData) error
- func (ts *Tester) TxSubscriptionBuy(creator, consumer string, plan string, months int) (*subscriptiontypes.MsgBuyResponse, error)
- func (ts *Tester) TxSubscriptionDelProject(creator string, projectID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRelayRequest ¶
func BuildRelayRequest(ctx context.Context, provider string, contentHash []byte, cuSum uint64, spec string, qos *types.QualityOfServiceReport) *types.RelaySession
func BuySubscription ¶
func BuySubscription(t *testing.T, ctx context.Context, keepers testkeeper.Keepers, servers testkeeper.Servers, acc Account, plan string)
func CreateMockPlan ¶
func CreateMockPolicy ¶
func CreateMockSpec ¶
func CreateMsgDetectionTest ¶
func CreateMsgDetectionTest(ctx context.Context, consumer Account, provider0 Account, provider1 Account, spec spectypes.Spec) (detectionMsg *conflicttypes.MsgDetection, reply1 *types.RelayReply, reply2 *types.RelayReply, errRet error)
func StakeAccount ¶
Types ¶
type Account ¶ added in v0.4.3
type Account struct { SK *btcSecp256k1.PrivateKey Addr sdk.AccAddress }
func CreateNewAccount ¶
type Tester ¶
type Tester struct { T *testing.T GoCtx context.Context Ctx sdk.Context Servers *testkeeper.Servers Keepers *testkeeper.Keepers // contains filtered or unexported fields }
func (*Tester) AddPolicy ¶
func (ts *Tester) AddPolicy(name string, policy planstypes.Policy) *Tester
func (*Tester) AddProjectData ¶
func (ts *Tester) AddProjectData(name string, pd projectstypes.ProjectData) *Tester
func (*Tester) AdvanceBlockUntilStale ¶
func (*Tester) AdvanceBlocks ¶
func (*Tester) AdvanceEpochUntilStale ¶
func (*Tester) AdvanceEpochs ¶
func (*Tester) AdvanceMonths ¶
AdvanceMonth advanced blocks by given months, like AdvanceMonthsFrom, starting from the current block's timestamp
func (*Tester) AdvanceMonthsFrom ¶
AdvanceMonthFrom advanced blocks by given months, i.e. until block times exceeds at least that many months since the from argument (minus 5 seconds, so caller can control when to cross the desired time).
func (*Tester) BlockHeight ¶
func (*Tester) BlocksToSave ¶
func (*Tester) GetProjectDeveloperData ¶
func (ts *Tester) GetProjectDeveloperData(devkey string, block uint64) (projectstypes.ProtoDeveloperData, error)
func (*Tester) GetProjectForBlock ¶
func (*Tester) GetProjectForDeveloper ¶
func (*Tester) ProjectData ¶
func (ts *Tester) ProjectData(name string) projectstypes.ProjectData
func (*Tester) QueryProjectDeveloper ¶
func (ts *Tester) QueryProjectDeveloper(devkey string) (*projectstypes.QueryDeveloperResponse, error)
QueryProjectDeveloper implements 'q project developer'
func (*Tester) QueryProjectInfo ¶
func (ts *Tester) QueryProjectInfo(projectID string) (*projectstypes.QueryInfoResponse, error)
QueryProjectInfo implements 'q project info'
func (*Tester) QuerySubscriptionListProjects ¶
func (ts *Tester) QuerySubscriptionListProjects(subkey string) (*subscriptiontypes.QueryListProjectsResponse, error)
QuerySubscriptionListProjects: implement 'q subscription list-projects'
func (*Tester) SetupAccounts ¶
func (*Tester) TxProposalAddPlans ¶
func (ts *Tester) TxProposalAddPlans(plans ...planstypes.Plan) error
func (*Tester) TxProposalAddSpecs ¶
func (*Tester) TxProposalDelPlans ¶
func (*Tester) TxSubscriptionAddProject ¶
func (ts *Tester) TxSubscriptionAddProject(creator string, pd projectstypes.ProjectData) error
TxSubscriptionAddProject: implement 'tx subscription add-project'
func (*Tester) TxSubscriptionBuy ¶
func (ts *Tester) TxSubscriptionBuy(creator, consumer string, plan string, months int) (*subscriptiontypes.MsgBuyResponse, error)
TxSubscriptionBuy: implement 'tx subscription buy'
Click to show internal directories.
Click to hide internal directories.