Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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 })
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment