Skip to content

Commit

Permalink
Merge pull request #217 from stader-labs/fix_sd_position
Browse files Browse the repository at this point in the history
Include sd utilized
  • Loading branch information
batphonghan authored Sep 3, 2024
2 parents b1a3702 + c718100 commit 10ec85f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shared/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package shared

const BinaryBucket string = "/stader-node-build/permissionless"
const DockerAccount string = "staderlabs"
const StaderVersion string = "1.6.1"
const StaderVersion string = "1.6.2"

const Logo string = `
_____ _ _ _ _ 𝅺
Expand Down
10 changes: 9 additions & 1 deletion stader/api/node/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,16 @@ func getStatus(c *cli.Context) (*api.NodeStatusResponse, error) {
}
response.DepositedSdCollateral = operatorSdCollateral

// get operator deposited sd collateral
utilizedSDBalance, err := sd_collateral.GetOperatorUtilizedSDBalance(sdc, nodeAccount.Address, nil)
if err != nil {
return nil, err
}

totalSDPosition := utilizedSDBalance.Add(utilizedSDBalance, operatorSdCollateral)

// total registerable validators
totalSdWorthValidators, err := sd_collateral.GetMaxValidatorSpawnable(sdc, operatorSdCollateral, 1, nil)
totalSdWorthValidators, err := sd_collateral.GetMaxValidatorSpawnable(sdc, totalSDPosition, 1, nil)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 10ec85f

Please sign in to comment.