*Add methods get_bootstrap_info and get_connected_peers to debug
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
f33e77da54
commit
58ff8f2f92
|
@ -162,6 +162,21 @@ const plugin: Plugin = {
|
||||||
.filter((item: any) => online.has(item));
|
.filter((item: any) => online.has(item));
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
api.registerMethod("get_bootstrap_info", {
|
||||||
|
cacheable: false,
|
||||||
|
async handler(): Promise<string[]> {
|
||||||
|
// @ts-ignore
|
||||||
|
return getRpcServer().cache.dhtCache._getBootstrapInfo();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
api.registerMethod("get_connected_peers", {
|
||||||
|
cacheable: false,
|
||||||
|
async handler(): Promise<string[]> {
|
||||||
|
// @ts-ignore
|
||||||
|
return [...getRpcServer().cache.dhtCache.connectedTo];
|
||||||
|
},
|
||||||
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue