MCPcopy Create free account
hub / github.com/DOSNetwork/core / balance

Method balance

dosnode/dos_restapis.go:97–106  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

95}
96
97func (d *DosNode) balance(w http.ResponseWriter, r *http.Request) {
98 html := "Balance :"
99 result, err := d.chain.Balance()
100 if err != nil {
101 html = html + err.Error()
102 } else {
103 html = html + result.String()
104 }
105 w.Write([]byte(html))
106}
107
108func (d *DosNode) enableAdmin(w http.ResponseWriter, r *http.Request) {
109 d.logger.Info("[DOS] isAdmin")

Callers

nothing calls this directly

Calls 4

BalanceMethod · 0.65
ErrorMethod · 0.65
StringMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected