|
|
@ -241,9 +241,9 @@ module.exports = class Query extends Readable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function autoCommit (node, dht, query) { |
|
|
|
if (!node.token) return Promise.reject(new Error('No token received for closest node')) |
|
|
|
return dht.request(query.target, query.command, query.value, node) |
|
|
|
function autoCommit (reply, dht, query) { |
|
|
|
if (!reply.token) return Promise.reject(new Error('No token received for closest node')) |
|
|
|
return dht.request(query.target, query.command, query.value, reply.from, { token: reply.token }) |
|
|
|
} |
|
|
|
|
|
|
|
function defaultMap (m) { |
|
|
|