routing API: set relay_id as HOST_PEER_ID (#90)

This commit is contained in:
Aleksey Proshutisnkiy
2022-03-28 10:35:54 +04:00
committed by GitHub
parent ef0ee12ca3
commit 164b353be8
4 changed files with 60 additions and 49 deletions

View File

@ -22,7 +22,6 @@ let local: Node[] = [
async function main() {
// connect to the Fluence network
await Fluence.start({ connectTo: krasnodar[0] });
console.log("%s", await timestamp_sec());
console.log(
@ -32,11 +31,10 @@ async function main() {
);
let label = "myLabel";
let value = "myValue";
console.log("Will create route with label: ", label);
console.log("Will create route with label:", label);
// create route (if not exists) and register on it
let relay = Fluence.getStatus().relayPeerId;
let route_id = await createRouteAndRegisterBlocking(
label, value, relay, null,
label, value, null,
(s) => console.log(`node ${s} saved the record`),
5
);