Commit 8d5c1ed9 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] #1118 WS2P pull was broken due to a missing property on the remote node object

parent c3e86be8
......@@ -27,6 +27,7 @@ interface RemoteNode {
getCurrent: () => Promise<BlockDTO>
getBlock: (number:number) => Promise<BlockDTO>
getBlocks: (count:number, fromNumber:number) => Promise<BlockDTO[]>
pubkey:string
}
class WS2PDao extends AbstractDAO {
......@@ -50,7 +51,8 @@ class WS2PDao extends AbstractDAO {
},
getBlocks: async (count:number, fromNumber:number) => {
return this.requester.getBlocks(count, fromNumber)
}
},
pubkey: this.requester.getPubkey()
}
}
......
......@@ -29,6 +29,10 @@ export class WS2PRequester {
return this.query(WS2P_REQ.BLOCKS_CHUNK, { count, fromNumber })
}
getPubkey() {
return this.ws2pc.pubkey || "########"
}
async getRequirementsPending(minCert = 1): Promise<any> {
return this.query(WS2P_REQ.WOT_REQUIREMENTS_OF_PENDING, { minCert })
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment