include comment to explain key pair tenary

This commit is contained in:
Ulf Gebhardt 2023-06-06 11:09:22 +02:00
parent 24df41365a
commit adc6998617
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -27,6 +27,7 @@ export type CommunityApi = {
export const startDHT = async (topic: string): Promise<void> => {
try {
const TOPIC = DHT.hash(Buffer.from(topic))
// uses a config defined seed or null, which will generate a random seed for the key pair
const keyPair = DHT.keyPair(
CONFIG.FEDERATION_DHT_SEED
? Buffer.alloc(KEY_SECRET_SEEDBYTES, CONFIG.FEDERATION_DHT_SEED)