Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating sp-info to make it generic #297

Closed
Naman-1234 opened this issue Sep 13, 2022 · 0 comments · Fixed by #309
Closed

Updating sp-info to make it generic #297

Naman-1234 opened this issue Sep 13, 2022 · 0 comments · Fixed by #309
Assignees

Comments

@Naman-1234
Copy link

Naman-1234 commented Sep 13, 2022

Currently, sp-info takes id to be blobber id(Please refer to schema for more details on this one).
This is causing issue in some of the issues desiring id of validator.

We need to replace it with the generic field ID. For instance replacing ID with provider_id and provider_type flags.

type StakePoolInfo struct {
	ID           string                      `json:"pool_id"`      // pool ID
	Balance      int64                       `json:"balance"`      // total balance
	Unstake      int64                       `json:"unstake"`      // total unstake amount
	Free         int64                       `json:"free"`         // free staked space
	Capacity     int64                       `json:"capacity"`     // blobber bid
	WritePrice   int64                       `json:"write_price"`  // its write price
	OffersTotal  int64                       `json:"offers_total"` //
	UnstakeTotal int64                       `json:"unstake_total"`
	Delegate     []StakePoolDelegatePoolInfo `json:"delegate"`
	Penalty      int64                       `json:"penalty"` // total for all
	Rewards      int64                       `json:"rewards"`
	Settings     StakePoolSettings           `json:"settings"`
}

type StakePoolDelegatePoolInfo struct {
	ID         string `json:"id"`          // blobber ID
	Balance    int64  `json:"balance"`     // current balance
	DelegateID string `json:"delegate_id"` // wallet
	Rewards    int64  `json:"rewards"`     // current
	UnStake    bool   `json:"unstake"`     // want to unstake

	TotalReward  int64  `json:"total_reward"`
	TotalPenalty int64  `json:"total_penalty"`
	Status       string `json:"status"`
	RoundCreated int64  `json:"round_created"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants