Skip to content

Commit

Permalink
Include sd utilized
Browse files Browse the repository at this point in the history
  • Loading branch information
batphonghan committed Sep 2, 2024
1 parent 9544f27 commit 0d71811
Showing 1 changed file with 9 additions and 1 deletion.
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 0d71811

Please sign in to comment.