Skip to content

How should parseAddress() be replaced? #31

@christianbundy

Description

@christianbundy

I've recently noticed a deprecation notice in Scuttlebot, but I'm having a difficult time replacing the deprecated function. I found a reference to multiserver-address, but I don't think ma.decode() is providing { host, port, key } the same way. Here's the error I'm getting when running npm test in the Scuttlebot repo:

/home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/index.js:165
        else throw new Error('must provide id:'+JSON.stringify(addr))
             ^

Error: must provide id:[[{"name":"net","data":["localhost","45451"]},{"name":"shs","data":["QnTycBc1Bm+suBWZmRWEbb7HqlJ/RIsQp/0TFswnHeA="]}]]
    at Object.get (/home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/index.js:165:20)
    at Object.<anonymous> (/home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/index.js:247:24)
    at apply (/home/christianbundy/src/ssbc/scuttlebot/node_modules/muxrpc-validation/index.js:173:15)
    at Object.add (/home/christianbundy/src/ssbc/scuttlebot/node_modules/muxrpc-validation/index.js:62:14)
    at /home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/init.js:12:37
    at Array.forEach (<anonymous>)
    at module.exports (/home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/init.js:12:4)
    at Object.init (/home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/index.js:304:5)
    at /home/christianbundy/src/ssbc/scuttlebot/node_modules/secret-stack/api.js:43:28
    at Array.forEach (<anonymous>)
npm ERR! Test failed.  See above for more details.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions