(w http.ResponseWriter, r *http.Request)
| 126 | } |
| 127 | |
| 128 | func (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 | |
| 148 | func (d *DosNode) signalRandom(w http.ResponseWriter, r *http.Request) { |
| 149 | d.chain.SignalRandom() |
nothing calls this directly
no test coverage detected