Skip to content

Commit

Permalink
Change stake pool fields (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sriep authored Mar 10, 2022
1 parent 96c6c2d commit 96ec38b
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions internal/cli/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,34 +215,31 @@ type BlobberAllocation struct {
}

type StakePoolInfo struct {
ID string `json:"pool_id"`
Balance int64 `json:"balance"`
Unstake int64 `json:"unstake"`
Free int64 `json:"free"`
Capacity int64 `json:"capacity"`
WritePrice int64 `json:"write_price"`
OffersTotal int64 `json:"offers_total"`
UnstakeTotal int64 `json:"unstake_total"`
Delegate []*StakePoolDelegatePoolInfo `json:"delegate"`
Penalty int64 `json:"penalty"`
Rewards StakePoolRewardsInfo `json:"rewards"`
Settings StakePoolSettings `json:"settings"`
}

// StakePoolRewardsInfo represents stake pool rewards.
type StakePoolRewardsInfo struct {
Charge int64 `json:"charge"` // total for all time
Blobber int64 `json:"blobber"` // total for all time
Validator int64 `json:"validator"` // total for all time
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"` // pool ID
ID string `json:"id"` // blobber ID
Balance int64 `json:"balance"` // current balance
DelegateID string `json:"delegate_id"` // wallet
Rewards int64 `json:"rewards"` // total for all time
Penalty int64 `json:"penalty"` // total for all time
Unstake bool `json:"unstake"`
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"`
}

type StakePoolSettings struct {
Expand Down

0 comments on commit 96ec38b

Please sign in to comment.