*Add methods get_bootstrap_info and get_connected_peers to debug
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Derrick Hammer 2022-12-15 13:44:50 -05:00
parent f33e77da54
commit 58ff8f2f92
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 15 additions and 0 deletions

View File

@ -162,6 +162,21 @@ const plugin: Plugin = {
.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];
},
});
},
};