summaryrefslogtreecommitdiff
path: root/daemon/algod/api/server/v1/handlers/handlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/algod/api/server/v1/handlers/handlers.go')
-rw-r--r--daemon/algod/api/server/v1/handlers/handlers.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/daemon/algod/api/server/v1/handlers/handlers.go b/daemon/algod/api/server/v1/handlers/handlers.go
index 0384e887e..9d2d34934 100644
--- a/daemon/algod/api/server/v1/handlers/handlers.go
+++ b/daemon/algod/api/server/v1/handlers/handlers.go
@@ -1637,8 +1637,7 @@ func GetSupply(ctx lib.ReqContext, context echo.Context) {
w := context.Response().Writer
- latest := ctx.Node.Ledger().Latest()
- totals, err := ctx.Node.Ledger().Totals(latest)
+ latest, totals, err := ctx.Node.Ledger().LatestTotals()
if err != nil {
err = fmt.Errorf("GetSupply(): round %d failed: %v", latest, err)
lib.ErrorResponse(w, http.StatusInternalServerError, err, errInternalFailure, ctx.Log)