Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAccAddr(w http.ResponseWriter, r *http.Request, data string) (sdk.AccAddress, bool)
- func GetIndexingNodeList(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, error)
- func GetIndexingNodes(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)
- func GetIndexingNodesByMoniker(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)
- func GetNetworkSet(ctx sdk.Context, k Keeper) ([]byte, error)
- func GetNodesStakingInfo(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, error)
- func GetRegisterParams(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)
- func GetResourceNodeList(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, error)
- func GetResourceNodes(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)
- func GetResourceNodesByMoniker(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error)
- func GetStakingInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, error)
- func GetStakingInfoByOwnerAddr(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) ([]byte, error)
- func MakeTestCodec() *codec.Codec
- func NewQuerier(k Keeper) sdk.Querier
- func SetConfig()
- type Keeper
- func (k Keeper) AddIndexingNodeStake(ctx sdk.Context, indexingNode types.IndexingNode, tokenToAdd sdk.Coin) (ozoneLimitChange sdk.Int, err error)
- func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.ResourceNode, tokenToAdd sdk.Coin) (ozoneLimitChange sdk.Int, err error)
- func (k Keeper) AfterNodeBeginUnbonding(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool)
- func (k Keeper) AfterNodeBonded(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool)
- func (k Keeper) AfterNodeCreated(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool)
- func (k Keeper) AfterNodeRemoved(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool)
- func (k Keeper) BeforeNodeModified(ctx sdk.Context, network sdk.AccAddress, isIndexingNode bool)
- func (k Keeper) BlockRegisteredNodesUpdates(ctx sdk.Context) []abci.ValidatorUpdate
- func (k Keeper) BondDenom(ctx sdk.Context) (res string)
- func (k Keeper) CompleteUnbonding(ctx sdk.Context, networkAddr sdk.AccAddress) error
- func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddr sdk.AccAddress) (sdk.Coins, error)
- func (k Keeper) DeleteLastIndexingNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress)
- func (k Keeper) DeleteLastResourceNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress)
- func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (matureUnbonds []sdk.AccAddress)
- func (k Keeper) GetAllIndexingNodes(ctx sdk.Context) (indexingNodes []types.IndexingNode)
- func (k Keeper) GetAllMatureUBDNodeQueue(ctx sdk.Context, currTime time.Time) (matureNetworkAddrs []sdk.AccAddress)
- func (k Keeper) GetAllResourceNodes(ctx sdk.Context) (resourceNodes []types.ResourceNode)
- func (k Keeper) GetAllUnbondingNodes(ctx sdk.Context) (unbondingNodes []types.UnbondingNode)
- func (k Keeper) GetAllUnbondingNodesTotalBalance(ctx sdk.Context) sdk.Int
- func (k Keeper) GetAllValidIndexingNodes(ctx sdk.Context) (indexingNodes []types.IndexingNode)
- func (k Keeper) GetIndexingNetworksIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetIndexingNode(ctx sdk.Context, addr sdk.AccAddress) (indexingNode types.IndexingNode, found bool)
- func (k Keeper) GetIndexingNodeBondedToken(ctx sdk.Context) (token sdk.Coin)
- func (k Keeper) GetIndexingNodeList(ctx sdk.Context, networkID string) (indexingNodes []types.IndexingNode, err error)
- func (k Keeper) GetIndexingNodeListByMoniker(ctx sdk.Context, moniker string) (resourceNodes []types.IndexingNode, err error)
- func (k Keeper) GetIndexingNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin)
- func (k Keeper) GetIndexingNodeRegistrationVotePool(ctx sdk.Context, nodeAddr sdk.AccAddress) (votePool types.IndexingNodeRegistrationVotePool, found bool)
- func (k Keeper) GetIndexingNodesFiltered(ctx sdk.Context, params QueryNodesParams) []types.IndexingNode
- func (k Keeper) GetInitialGenesisStakeTotal(ctx sdk.Context) (stake sdk.Int)
- func (k Keeper) GetLastIndexingNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress) (stake sdk.Int)
- func (k Keeper) GetLastResourceNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress) (stake sdk.Int)
- func (k Keeper) GetNetworks(ctx sdk.Context, keeper Keeper) (res []byte)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int)
- func (k Keeper) GetResourceNetworksIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetResourceNode(ctx sdk.Context, addr sdk.AccAddress) (resourceNode types.ResourceNode, found bool)
- func (k Keeper) GetResourceNodeBondedToken(ctx sdk.Context) (token sdk.Coin)
- func (k Keeper) GetResourceNodeList(ctx sdk.Context, networkID string) (resourceNodes []types.ResourceNode, err error)
- func (k Keeper) GetResourceNodeListByMoniker(ctx sdk.Context, moniker string) (resourceNodes []types.ResourceNode, err error)
- func (k Keeper) GetResourceNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin)
- func (k Keeper) GetResourceNodesFiltered(ctx sdk.Context, params QueryNodesParams) []types.ResourceNode
- func (k Keeper) GetUnbondingNode(ctx sdk.Context, networkAddr sdk.AccAddress) (ubd types.UnbondingNode, found bool)
- func (k Keeper) GetUnbondingNodeBalance(ctx sdk.Context, networkAddr sdk.AccAddress) sdk.Int
- func (k Keeper) GetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (networkAddrs []sdk.AccAddress)
- func (k Keeper) GetUnbondingNodes(ctx sdk.Context, networkAddr sdk.AccAddress, maxRetrieve uint16) (unbondingIndexingNodes []types.UnbondingNode)
- func (k Keeper) HandleVoteForIndexingNodeRegistration(ctx sdk.Context, nodeAddr sdk.AccAddress, ownerAddr sdk.AccAddress, ...) (nodeStatus sdk.BondStatus, err error)
- func (k Keeper) HasMaxUnbondingNodeEntries(ctx sdk.Context, networkAddr sdk.AccAddress) bool
- func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNode, completionTime time.Time)
- func (k Keeper) IterateLastIndexingNodeStakes(ctx sdk.Context, ...)
- func (k Keeper) IterateLastResourceNodeStakes(ctx sdk.Context, ...)
- func (k Keeper) IterateUnbondingNodes(ctx sdk.Context, fn func(index int64, ubd types.UnbondingNode) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MaxEntries(ctx sdk.Context) (res uint16)
- func (k Keeper) RegisterIndexingNode(ctx sdk.Context, networkID string, pubKey crypto.PubKey, ...) (ozoneLimitChange sdk.Int, err error)
- func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkID string, pubKey crypto.PubKey, ...) (ozoneLimitChange sdk.Int, err error)
- func (k Keeper) RemoveTokenFromPoolWhileUnbondingIndexingNode(ctx sdk.Context, indexingNode types.IndexingNode, tokenToSub sdk.Coin) error
- func (k Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error
- func (k Keeper) RemoveUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode)
- func (k *Keeper) SetHooks(sh types.RegisterHooks) *Keeper
- func (k Keeper) SetIndexingNode(ctx sdk.Context, indexingNode types.IndexingNode)
- func (k Keeper) SetIndexingNodeBondedToken(ctx sdk.Context, token sdk.Coin)
- func (k Keeper) SetIndexingNodeNotBondedToken(ctx sdk.Context, token sdk.Coin)
- func (k Keeper) SetIndexingNodeRegistrationVotePool(ctx sdk.Context, votePool types.IndexingNodeRegistrationVotePool)
- func (k Keeper) SetInitialGenesisStakeTotal(ctx sdk.Context, stake sdk.Int)
- func (k Keeper) SetLastIndexingNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress, stake sdk.Int)
- func (k Keeper) SetLastResourceNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress, stake sdk.Int)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetRemainingOzoneLimit(ctx sdk.Context, value sdk.Int)
- func (k Keeper) SetResourceNode(ctx sdk.Context, resourceNode types.ResourceNode)
- func (k Keeper) SetResourceNodeBondedToken(ctx sdk.Context, token sdk.Coin)
- func (k Keeper) SetResourceNodeNotBondedToken(ctx sdk.Context, token sdk.Coin)
- func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode)
- func (k Keeper) SetUnbondingNodeEntry(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool, ...) types.UnbondingNode
- func (k Keeper) SetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys []sdk.AccAddress)
- func (k Keeper) SubtractIndexingNodeStake(ctx sdk.Context, indexingNode types.IndexingNode, tokenToSub sdk.Coin) error
- func (k Keeper) SubtractResourceNodeStake(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error
- func (k Keeper) SubtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, tokenToSub sdk.Coin) error
- func (k Keeper) UBDNodeQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator
- func (k Keeper) UnbondAllMatureUBDNodeQueue(ctx sdk.Context)
- func (k Keeper) UnbondIndexingNode(ctx sdk.Context, indexingNode types.IndexingNode, amt sdk.Int) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error)
- func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, amt sdk.Int) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error)
- func (k Keeper) UnbondingCompletionTime(ctx sdk.Context) (res time.Duration)
- func (k Keeper) UnbondingNodeQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator
- func (k Keeper) UnbondingThreasholdTime(ctx sdk.Context) (res time.Duration)
- func (k Keeper) UpdateIndexingNode(ctx sdk.Context, networkID string, description types.Description, ...) error
- func (k Keeper) UpdateResourceNode(ctx sdk.Context, networkID string, description types.Description, ...) error
- type NodesStakingInfo
- type QueryNodeStakingParams
- type QueryNodesParams
- type StakingInfoByIndexingNodeAddr
- type StakingInfoByResourceNodeAddr
Constants ¶
const ( QueryResourceNodeList = "resource_nodes" QueryResourceNodeByMoniker = "resource_nodes_moniker" QueryIndexingNodeList = "indexing_nodes" QueryIndexingNodeByMoniker = "indexing_nodes_moniker" QueryNodesTotalStakes = "nodes_total_stakes" QueryNodeStakeByNodeAddr = "node_stakes" QueryNodeStakeByOwner = "node_stakes_by_owner" QueryRegisterParams = "register_params" QueryDefaultLimit = 100 )
const (
StratosBech32Prefix = "st"
)
Variables ¶
var ( AccountPubKeyPrefix = StratosBech32Prefix + "pub" ValidatorAddressPrefix = StratosBech32Prefix + "valoper" ValidatorPubKeyPrefix = StratosBech32Prefix + "valoperpub" ConsNodeAddressPrefix = StratosBech32Prefix + "valcons" ConsNodePubKeyPrefix = StratosBech32Prefix + "valconspub" SdsNodeP2PKeyPrefix = StratosBech32Prefix + "sdsp2p" )
Functions ¶
func CheckAccAddr ¶ added in v0.4.0
func CheckAccAddr(w http.ResponseWriter, r *http.Request, data string) (sdk.AccAddress, bool)
func GetIndexingNodeList ¶ added in v0.4.0
func GetIndexingNodes ¶
GetIndexingNodes fetches all indexing nodes by network address.
func GetNetworkSet ¶
GetNetworkSet fetches all network addresses.
func GetNodesStakingInfo ¶ added in v0.4.0
func GetRegisterParams ¶ added in v0.4.0
func GetResourceNodeList ¶ added in v0.4.0
func GetResourceNodes ¶
GetResourceNodes fetches all resource nodes by network address.
func GetStakingInfoByNodeAddr ¶ added in v0.4.0
func GetStakingInfoByOwnerAddr ¶ added in v0.4.0
func NewQuerier ¶
NewQuerier creates a new querier for register clients.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the register store
func CreateTestInput ¶
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramSpace params.Subspace, accountKeeper auth.AccountKeeper, bankKeeper bank.Keeper) Keeper
NewKeeper creates a register keeper
func (Keeper) AddIndexingNodeStake ¶
func (k Keeper) AddIndexingNodeStake(ctx sdk.Context, indexingNode types.IndexingNode, tokenToAdd sdk.Coin, ) (ozoneLimitChange sdk.Int, err error)
AddIndexingNodeStake Update the tokens of an existing indexing node
func (Keeper) AddResourceNodeStake ¶
func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.ResourceNode, tokenToAdd sdk.Coin, ) (ozoneLimitChange sdk.Int, err error)
AddResourceNodeStake Update the tokens of an existing resource node
func (Keeper) AfterNodeBeginUnbonding ¶ added in v0.4.0
func (k Keeper) AfterNodeBeginUnbonding(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool)
AfterNodeBeginUnbonding - call hook if registered
func (Keeper) AfterNodeBonded ¶ added in v0.4.0
AfterNodeBonded - call hook if registered
func (Keeper) AfterNodeCreated ¶ added in v0.4.0
AfterNodeCreated - call hook if registered
func (Keeper) AfterNodeRemoved ¶ added in v0.4.0
AfterNodeRemoved - call hook if registered
func (Keeper) BeforeNodeModified ¶ added in v0.4.0
BeforeNodeModified - call hook if registered
func (Keeper) BlockRegisteredNodesUpdates ¶ added in v0.4.0
func (k Keeper) BlockRegisteredNodesUpdates(ctx sdk.Context) []abci.ValidatorUpdate
Called in each EndBlock
func (Keeper) CompleteUnbonding ¶ added in v0.4.0
CompleteUnbonding performs the same logic as CompleteUnbondingWithAmount except it does not return the total unbonding amount.
func (Keeper) CompleteUnbondingWithAmount ¶ added in v0.4.0
func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddr sdk.AccAddress) (sdk.Coins, error)
CompleteUnbondingWithAmount completes the unbonding of all mature entries in the retrieved unbonding delegation object and returns the total unbonding balance or an error upon failure.
func (Keeper) DeleteLastIndexingNodeStake ¶
func (k Keeper) DeleteLastIndexingNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress)
DeleteLastIndexingNodeStake Delete the last indexing node stake.
func (Keeper) DeleteLastResourceNodeStake ¶
func (k Keeper) DeleteLastResourceNodeStake(ctx sdk.Context, nodeAddr sdk.AccAddress)
DeleteLastResourceNodeStake Delete the last resource node stake.
func (Keeper) DequeueAllMatureUBDQueue ¶ added in v0.4.0
func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (matureUnbonds []sdk.AccAddress)
Returns a concatenated list of all the timeslices inclusively previous to currTime, and deletes the timeslices from the queue
func (Keeper) GetAllIndexingNodes ¶
func (k Keeper) GetAllIndexingNodes(ctx sdk.Context) (indexingNodes []types.IndexingNode)
GetAllIndexingNodes get the set of all indexing nodes with no limits, used during genesis dump
func (Keeper) GetAllMatureUBDNodeQueue ¶ added in v0.4.0
func (k Keeper) GetAllMatureUBDNodeQueue(ctx sdk.Context, currTime time.Time) (matureNetworkAddrs []sdk.AccAddress)
Returns a concatenated list of all the timeslices before currTime, and deletes the timeslices from the queue
func (Keeper) GetAllResourceNodes ¶
func (k Keeper) GetAllResourceNodes(ctx sdk.Context) (resourceNodes []types.ResourceNode)
GetAllResourceNodes get the set of all resource nodes with no limits, used during genesis dump
func (Keeper) GetAllUnbondingNodes ¶ added in v0.4.0
func (k Keeper) GetAllUnbondingNodes(ctx sdk.Context) (unbondingNodes []types.UnbondingNode)
GetAllUnbondingNodes get the set of all ubd nodes with no limits, used during genesis dump
func (Keeper) GetAllUnbondingNodesTotalBalance ¶ added in v0.4.0
func (Keeper) GetAllValidIndexingNodes ¶
func (k Keeper) GetAllValidIndexingNodes(ctx sdk.Context) (indexingNodes []types.IndexingNode)
GetAllValidIndexingNodes get the set of all bonded & not suspended indexing nodes
func (Keeper) GetIndexingNetworksIterator ¶
GetIndexingNetworksIterator gets an iterator over all network addresses
func (Keeper) GetIndexingNode ¶
func (k Keeper) GetIndexingNode(ctx sdk.Context, addr sdk.AccAddress) (indexingNode types.IndexingNode, found bool)
GetIndexingNode get a single indexing node
func (Keeper) GetIndexingNodeBondedToken ¶ added in v0.4.0
func (Keeper) GetIndexingNodeList ¶
func (k Keeper) GetIndexingNodeList(ctx sdk.Context, networkID string) (indexingNodes []types.IndexingNode, err error)
GetIndexingNodeList get all indexing nodes by network ID
func (Keeper) GetIndexingNodeListByMoniker ¶
func (Keeper) GetIndexingNodeNotBondedToken ¶ added in v0.4.0
func (Keeper) GetIndexingNodeRegistrationVotePool ¶
func (k Keeper) GetIndexingNodeRegistrationVotePool(ctx sdk.Context, nodeAddr sdk.AccAddress) (votePool types.IndexingNodeRegistrationVotePool, found bool)
func (Keeper) GetIndexingNodesFiltered ¶ added in v0.4.0
func (k Keeper) GetIndexingNodesFiltered(ctx sdk.Context, params QueryNodesParams) []types.IndexingNode
func (Keeper) GetInitialGenesisStakeTotal ¶
func (Keeper) GetLastIndexingNodeStake ¶
GetLastIndexingNodeStake Load the last indexing node stake. Returns zero if the node was not a indexing node last block.
func (Keeper) GetLastResourceNodeStake ¶
GetLastResourceNodeStake Load the last resource node stake. Returns zero if the node was not a resource node last block.
func (Keeper) GetNetworks ¶
func (Keeper) GetRemainingOzoneLimit ¶
func (Keeper) GetResourceNetworksIterator ¶
GetResourceNetworksIterator gets an iterator over all network addresses
func (Keeper) GetResourceNode ¶
func (k Keeper) GetResourceNode(ctx sdk.Context, addr sdk.AccAddress) (resourceNode types.ResourceNode, found bool)
GetResourceNode get a single resource node
func (Keeper) GetResourceNodeBondedToken ¶ added in v0.4.0
func (Keeper) GetResourceNodeList ¶
func (k Keeper) GetResourceNodeList(ctx sdk.Context, networkID string) (resourceNodes []types.ResourceNode, err error)
GetResourceNodeList get all resource nodes by network address
func (Keeper) GetResourceNodeListByMoniker ¶
func (Keeper) GetResourceNodeNotBondedToken ¶ added in v0.4.0
func (Keeper) GetResourceNodesFiltered ¶ added in v0.4.0
func (k Keeper) GetResourceNodesFiltered(ctx sdk.Context, params QueryNodesParams) []types.ResourceNode
func (Keeper) GetUnbondingNode ¶ added in v0.4.0
func (k Keeper) GetUnbondingNode(ctx sdk.Context, networkAddr sdk.AccAddress) (ubd types.UnbondingNode, found bool)
return a unbonding UnbondingIndexingNode
func (Keeper) GetUnbondingNodeBalance ¶ added in v0.4.0
GetUnbondingNodeBalance returns an unbonding balance and an UnbondingNode
func (Keeper) GetUnbondingNodeQueueTimeSlice ¶ added in v0.4.0
func (k Keeper) GetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (networkAddrs []sdk.AccAddress)
gets a specific unbonding queue timeslice. A timeslice is a slice of DVPairs corresponding to unbonding delegations that expire at a certain time.
func (Keeper) GetUnbondingNodes ¶ added in v0.4.0
func (k Keeper) GetUnbondingNodes(ctx sdk.Context, networkAddr sdk.AccAddress, maxRetrieve uint16) (unbondingIndexingNodes []types.UnbondingNode)
return a given amount of all the UnbondingIndexingNodes
func (Keeper) HandleVoteForIndexingNodeRegistration ¶
func (k Keeper) HandleVoteForIndexingNodeRegistration(ctx sdk.Context, nodeAddr sdk.AccAddress, ownerAddr sdk.AccAddress, opinion types.VoteOpinion, voterAddr sdk.AccAddress) (nodeStatus sdk.BondStatus, err error)
func (Keeper) HasMaxUnbondingNodeEntries ¶ added in v0.4.0
HasMaxUnbondingIndexingNodeEntries - check if unbonding IndexingNode has maximum number of entries
func (Keeper) InsertUnbondingNodeQueue ¶ added in v0.4.0
func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNode, completionTime time.Time)
Insert an unbonding delegation to the appropriate timeslice in the unbonding queue
func (Keeper) IterateLastIndexingNodeStakes ¶
func (k Keeper) IterateLastIndexingNodeStakes(ctx sdk.Context, handler func(nodeAddr sdk.AccAddress, stake sdk.Int) (stop bool))
IterateLastIndexingNodeStakes Iterate over last indexing node stakes.
func (Keeper) IterateLastResourceNodeStakes ¶
func (k Keeper) IterateLastResourceNodeStakes(ctx sdk.Context, handler func(nodeAddr sdk.AccAddress, stake sdk.Int) (stop bool))
IterateLastResourceNodeStakes Iterate over last resource node stakes.
func (Keeper) IterateUnbondingNodes ¶ added in v0.4.0
func (k Keeper) IterateUnbondingNodes(ctx sdk.Context, fn func(index int64, ubd types.UnbondingNode) (stop bool))
iterate through all of the unbonding indexingNodes
func (Keeper) MaxEntries ¶ added in v0.4.0
MaxEntries - Maximum number of simultaneous unbonding delegations or redelegations (per pair/trio)
func (Keeper) RegisterIndexingNode ¶
func (Keeper) RegisterResourceNode ¶
func (Keeper) RemoveTokenFromPoolWhileUnbondingIndexingNode ¶ added in v0.4.0
func (Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode ¶ added in v0.4.0
func (Keeper) RemoveUnbondingNode ¶ added in v0.4.0
func (k Keeper) RemoveUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode)
remove the unbonding IndexingNode object
func (*Keeper) SetHooks ¶ added in v0.4.0
func (k *Keeper) SetHooks(sh types.RegisterHooks) *Keeper
Set the register hooks
func (Keeper) SetIndexingNode ¶
func (k Keeper) SetIndexingNode(ctx sdk.Context, indexingNode types.IndexingNode)
set the main record holding indexing node details
func (Keeper) SetIndexingNodeBondedToken ¶ added in v0.4.0
func (Keeper) SetIndexingNodeNotBondedToken ¶ added in v0.4.0
func (Keeper) SetIndexingNodeRegistrationVotePool ¶
func (k Keeper) SetIndexingNodeRegistrationVotePool(ctx sdk.Context, votePool types.IndexingNodeRegistrationVotePool)
func (Keeper) SetInitialGenesisStakeTotal ¶
func (Keeper) SetLastIndexingNodeStake ¶
SetLastIndexingNodeStake Set the last indexing node stake.
func (Keeper) SetLastResourceNodeStake ¶
SetLastResourceNodeStake Set the last resource node stake.
func (Keeper) SetRemainingOzoneLimit ¶
func (Keeper) SetResourceNode ¶
func (k Keeper) SetResourceNode(ctx sdk.Context, resourceNode types.ResourceNode)
SetResourceNode sets the main record holding resource node details
func (Keeper) SetResourceNodeBondedToken ¶ added in v0.4.0
func (Keeper) SetResourceNodeNotBondedToken ¶ added in v0.4.0
func (Keeper) SetUnbondingNode ¶ added in v0.4.0
func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode)
set the unbonding IndexingNode
func (Keeper) SetUnbondingNodeEntry ¶ added in v0.4.0
func (k Keeper) SetUnbondingNodeEntry(ctx sdk.Context, networkAddr sdk.AccAddress, isIndexingNode bool, creationHeight int64, minTime time.Time, balance sdk.Int) types.UnbondingNode
SetUnbondingIndexingNodeEntry adds an entry to the unbonding IndexingNode at the given addresses. It creates the unbonding IndexingNode if it does not exist
func (Keeper) SetUnbondingNodeQueueTimeSlice ¶ added in v0.4.0
func (k Keeper) SetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys []sdk.AccAddress)
Sets a specific unbonding queue timeslice.
func (Keeper) SubtractIndexingNodeStake ¶
func (k Keeper) SubtractIndexingNodeStake(ctx sdk.Context, indexingNode types.IndexingNode, tokenToSub sdk.Coin) error
SubtractIndexingNodeStake Update the tokens of an existing indexing node
func (Keeper) SubtractResourceNodeStake ¶
func (k Keeper) SubtractResourceNodeStake(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error
SubtractResourceNodeStake Update the tokens of an existing resource node
func (Keeper) SubtractUBDNodeStake ¶ added in v0.4.0
func (Keeper) UBDNodeQueueIterator ¶ added in v0.4.0
Returns all the validator queue timeslices from time 0 until endTime
func (Keeper) UnbondAllMatureUBDNodeQueue ¶ added in v0.4.0
Unbonds all the unbonding validators that have finished their unbonding period
func (Keeper) UnbondIndexingNode ¶ added in v0.4.0
func (Keeper) UnbondResourceNode ¶ added in v0.4.0
func (Keeper) UnbondingCompletionTime ¶ added in v0.4.0
UnbondingCompletionTime
func (Keeper) UnbondingNodeQueueIterator ¶ added in v0.4.0
Returns all the unbonding queue timeslices from time 0 until endTime
func (Keeper) UnbondingThreasholdTime ¶ added in v0.4.0
UnbondingThreasholdTime
func (Keeper) UpdateIndexingNode ¶ added in v0.4.0
func (k Keeper) UpdateIndexingNode(ctx sdk.Context, networkID string, description types.Description, networkAddr sdk.AccAddress, ownerAddr sdk.AccAddress) error
func (Keeper) UpdateResourceNode ¶ added in v0.4.0
func (k Keeper) UpdateResourceNode(ctx sdk.Context, networkID string, description types.Description, nodeType string, networkAddr sdk.AccAddress, ownerAddr sdk.AccAddress) error
type NodesStakingInfo ¶ added in v0.4.0
type NodesStakingInfo struct { TotalStakeOfResourceNodes sdk.Coin TotalStakeOfIndexingNodes sdk.Coin TotalBondedStake sdk.Coin TotalUnbondedStake sdk.Coin TotalUnbondingStake sdk.Coin }
NodesStakingInfo Params for query 'custom/register/staking'
func NewQueryNodesStakingInfo ¶ added in v0.4.0
func NewQueryNodesStakingInfo( totalStakeOfResourceNodes, totalStakeOfIndexingNodes, totalBondedStake, totalUnbondedStake, totalUnbondingStake sdk.Int, ) NodesStakingInfo
NewQueryNodesStakingInfo creates a new instance of NodesStakingInfo
type QueryNodeStakingParams ¶ added in v0.4.0
type QueryNodeStakingParams struct {
AccAddr sdk.AccAddress
}
func NewQuerynodeStakingParams ¶ added in v0.4.0
func NewQuerynodeStakingParams(nodeAddr sdk.AccAddress) QueryNodeStakingParams
NewQuerynodeStakingParams creates a new instance of QueryNodesParams
type QueryNodesParams ¶ added in v0.4.0
type QueryNodesParams struct { Page int Limit int NetworkID string Moniker string OwnerAddr sdk.AccAddress }
QueryNodesParams Params for query 'custom/register/resource-nodes'
func NewQueryNodesParams ¶ added in v0.4.0
func NewQueryNodesParams(page, limit int, networkID, moniker string, ownerAddr sdk.AccAddress) QueryNodesParams
NewQueryNodesParams creates a new instance of QueryNodesParams
type StakingInfoByIndexingNodeAddr ¶ added in v0.4.0
type StakingInfoByIndexingNodeAddr struct { types.IndexingNode BondedStake sdk.Coin UnbondingStake sdk.Coin UnbondedStake sdk.Coin }
func NewStakingInfoByIndexingNodeAddr ¶ added in v0.4.0
func NewStakingInfoByIndexingNodeAddr( indexingNode types.IndexingNode, unbondingStake sdk.Int, unbondedStake sdk.Int, bondedStake sdk.Int, ) StakingInfoByIndexingNodeAddr
NewStakingInfoByIndexingNodeAddr creates a new instance of StakingInfoByNodeAddr
type StakingInfoByResourceNodeAddr ¶ added in v0.4.0
type StakingInfoByResourceNodeAddr struct { types.ResourceNode BondedStake sdk.Coin UnbondingStake sdk.Coin UnbondedStake sdk.Coin }
func NewStakingInfoByResourceNodeAddr ¶ added in v0.4.0
func NewStakingInfoByResourceNodeAddr( resourceNode types.ResourceNode, unbondingStake sdk.Int, unbondedStake sdk.Int, bondedStake sdk.Int, ) StakingInfoByResourceNodeAddr
NewStakingInfoByResourceNodeAddr creates a new instance of StakingInfoByNodeAddr