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

Method signalBootstrap

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

Source from the content-addressed store, hash-verified

126}
127
128func (d *DosNode) signalBootstrap(w http.ResponseWriter, r *http.Request) {
129 cid := -1
130 switch r.Method {
131 case "GET":
132 for k, v := range r.URL.Query() {
133 fmt.Printf("[DOS] %s: %s\n", k, v)
134 if k == "cid" {
135 i, err := strconv.Atoi(v[0])
136 if err == nil && i >= 0 {
137 cid = i
138 }
139 }
140 }
141 default:
142 }
143 if cid >= 0 {
144 d.chain.SignalBootstrap(big.NewInt(int64(cid)))
145 }
146}
147
148func (d *DosNode) signalRandom(w http.ResponseWriter, r *http.Request) {
149 d.chain.SignalRandom()

Callers

nothing calls this directly

Calls 2

SignalBootstrapMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected