keeper

package
v1.2.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StartBlockType = "start"
	EndBlockType   = "end"
	TwoGigs        = 2000000000
)

Variables

This section is empty.

Functions

func MakeCid

func MakeCid(data []byte) (string, error)

func MakeFid

func MakeFid(data []byte) (string, error)

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
	ps paramtypes.Subspace,
	bankkeeper types.BankKeeper,
	accountkeeper types.AccountKeeper,
) *Keeper

func (Keeper) CreatePayBlock

func (k Keeper) CreatePayBlock(ctx sdk.Context, address string, length int64, bytes int64) error

func (Keeper) FindFile

func (Keeper) Freespace

func (Keeper) GetActiveDeals

func (k Keeper) GetActiveDeals(
	ctx sdk.Context,
	cid string,
) (val types.ActiveDeals, found bool)

GetActiveDeals returns a activeDeals from its index

func (Keeper) GetAllActiveDeals

func (k Keeper) GetAllActiveDeals(ctx sdk.Context) (list []types.ActiveDeals)

GetAllActiveDeals returns all activeDeals

func (Keeper) GetAllClientUsage

func (k Keeper) GetAllClientUsage(ctx sdk.Context) (list []types.ClientUsage)

GetAllClientUsage returns all clientUsage

func (Keeper) GetAllContracts

func (k Keeper) GetAllContracts(ctx sdk.Context) (list []types.Contracts)

GetAllContracts returns all contracts

func (Keeper) GetAllFidCid

func (k Keeper) GetAllFidCid(ctx sdk.Context) (list []types.FidCid)

GetAllFidCid returns all fidCid

func (Keeper) GetAllPayBlocks

func (k Keeper) GetAllPayBlocks(ctx sdk.Context) (list []types.PayBlocks)

GetAllPayBlocks returns all payBlocks

func (Keeper) GetAllProviders

func (k Keeper) GetAllProviders(ctx sdk.Context) (list []types.Providers)

GetAllProviders returns all providers

func (Keeper) GetAllStrays

func (k Keeper) GetAllStrays(ctx sdk.Context) (list []types.Strays)

GetAllStrays returns all strays

func (Keeper) GetClientUsage

func (k Keeper) GetClientUsage(
	ctx sdk.Context,
	address string,
) (val types.ClientUsage, found bool)

GetClientUsage returns a clientUsage from its index

func (Keeper) GetContracts

func (k Keeper) GetContracts(
	ctx sdk.Context,
	cid string,
) (val types.Contracts, found bool)

GetContracts returns a contracts from its index

func (Keeper) GetFidCid

func (k Keeper) GetFidCid(
	ctx sdk.Context,
	fid string,
) (val types.FidCid, found bool)

GetFidCid returns a fidCid from its index

func (Keeper) GetPaidAmount

func (k Keeper) GetPaidAmount(ctx sdk.Context, address string, blockh int64) (int64, bool, *types.PayBlocks)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) GetPayBlocks

func (k Keeper) GetPayBlocks(
	ctx sdk.Context,
	blockid string,
) (val types.PayBlocks, found bool)

GetPayBlocks returns a payBlocks from its index

func (Keeper) GetPayData

func (Keeper) GetProviderUsing

func (k Keeper) GetProviderUsing(ctx sdk.Context, provider string) int64

func (Keeper) GetProviders

func (k Keeper) GetProviders(
	ctx sdk.Context,
	address string,
) (val types.Providers, found bool)

GetProviders returns a providers from its index

func (Keeper) GetStrays

func (k Keeper) GetStrays(
	ctx sdk.Context,
	cid string,
) (val types.Strays, found bool)

GetStrays returns a strays from its index

func (Keeper) HandleBlock

func (k Keeper) HandleBlock(ctx sdk.Context)

func (Keeper) ListFiles

func (k Keeper) ListFiles(ctx sdk.Context, fid string) []string

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) Params

func (Keeper) RemoveActiveDeals

func (k Keeper) RemoveActiveDeals(
	ctx sdk.Context,
	cid string,
)

RemoveActiveDeals removes a activeDeals from the store

func (Keeper) RemoveClientUsage

func (k Keeper) RemoveClientUsage(
	ctx sdk.Context,
	address string,
)

RemoveClientUsage removes a clientUsage from the store

func (Keeper) RemoveContracts

func (k Keeper) RemoveContracts(
	ctx sdk.Context,
	cid string,
)

RemoveContracts removes a contracts from the store

func (Keeper) RemoveFidCid

func (k Keeper) RemoveFidCid(
	ctx sdk.Context,
	fid string,
)

RemoveFidCid removes a fidCid from the store

func (Keeper) RemovePayBlocks

func (k Keeper) RemovePayBlocks(
	ctx sdk.Context,
	blockid string,
)

RemovePayBlocks removes a payBlocks from the store

func (Keeper) RemoveProviders

func (k Keeper) RemoveProviders(
	ctx sdk.Context,
	address string,
)

RemoveProviders removes a providers from the store

func (Keeper) RemoveStrays

func (k Keeper) RemoveStrays(
	ctx sdk.Context,
	cid string,
)

RemoveStrays removes a strays from the store

func (Keeper) SetActiveDeals

func (k Keeper) SetActiveDeals(ctx sdk.Context, activeDeals types.ActiveDeals)

SetActiveDeals set a specific activeDeals in the store from its index

func (Keeper) SetClientUsage

func (k Keeper) SetClientUsage(ctx sdk.Context, clientUsage types.ClientUsage)

SetClientUsage set a specific clientUsage in the store from its index

func (Keeper) SetContracts

func (k Keeper) SetContracts(ctx sdk.Context, contracts types.Contracts)

SetContracts set a specific contracts in the store from its index

func (Keeper) SetFidCid

func (k Keeper) SetFidCid(ctx sdk.Context, fidCid types.FidCid)

SetFidCid set a specific fidCid in the store from its index

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetPayBlocks

func (k Keeper) SetPayBlocks(ctx sdk.Context, payBlocks types.PayBlocks)

SetPayBlocks set a specific payBlocks in the store from its index

func (Keeper) SetProviders

func (k Keeper) SetProviders(ctx sdk.Context, providers types.Providers)

SetProviders set a specific providers in the store from its index

func (Keeper) SetStrays

func (k Keeper) SetStrays(ctx sdk.Context, strays types.Strays)

SetStrays set a specific strays in the store from its index

Jump to

Keyboard shortcuts

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