mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-16 15:40:49 +00:00
fix: peer routing for delegate router (#377)
* fix: peer routing tests
* test: fix mock payload type
Provider results are type 4, not type 1: 6e566d10f4/routing/query.go (L15-L24)
This commit is contained in:
parent
10811e9ced
commit
905c911946
@ -47,7 +47,7 @@ module.exports = (node) => {
|
||||
})
|
||||
|
||||
tryEach(tasks, (err, results) => {
|
||||
if (err && err.code !== 'NOT_FOUND') {
|
||||
if (err) {
|
||||
return callback(err)
|
||||
}
|
||||
results = results || []
|
||||
|
@ -251,7 +251,7 @@ describe('.contentRouting', () => {
|
||||
timeout: '1000ms',
|
||||
'stream-channels': true
|
||||
})
|
||||
.reply(200, `{"Extra":"","ID":"QmWKqWXCtRXEeCQTo3FoZ7g4AfnGiauYYiczvNxFCHicbB","Responses":[{"Addrs":["/ip4/0.0.0.0/tcp/0"],"ID":"${provider}"}],"Type":1}\n`, [
|
||||
.reply(200, `{"Extra":"","ID":"QmWKqWXCtRXEeCQTo3FoZ7g4AfnGiauYYiczvNxFCHicbB","Responses":[{"Addrs":["/ip4/0.0.0.0/tcp/0"],"ID":"${provider}"}],"Type":4}\n`, [
|
||||
'Content-Type', 'application/json',
|
||||
'X-Chunked-Output', '1'
|
||||
])
|
||||
|
Loading…
x
Reference in New Issue
Block a user