(ma)
| 48209 | // they are completely worthless for all the other peers. This method is |
| 48210 | // exclusively used by identify. |
| 48211 | addSafe (ma) { |
| 48212 | ma = ensureMultiaddr(ma) |
| 48213 | |
| 48214 | const check = this._observedMultiaddrs.some((m, i) => { |
| 48215 | if (m.equals(ma)) { |
| 48216 | this.add(ma) |
| 48217 | this._observedMultiaddrs.splice(i, 1) |
| 48218 | return true |
| 48219 | } |
| 48220 | }) |
| 48221 | if (!check) { |
| 48222 | this._observedMultiaddrs.push(ma) |
| 48223 | } |
| 48224 | } |
| 48225 | |
| 48226 | toArray () { |
| 48227 | return this._multiaddrs.slice() |
nothing calls this directly
no test coverage detected