mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
include comment to explain key pair tenary
This commit is contained in:
parent
24df41365a
commit
adc6998617
@ -27,6 +27,7 @@ export type CommunityApi = {
|
|||||||
export const startDHT = async (topic: string): Promise<void> => {
|
export const startDHT = async (topic: string): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
const TOPIC = DHT.hash(Buffer.from(topic))
|
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(
|
const keyPair = DHT.keyPair(
|
||||||
CONFIG.FEDERATION_DHT_SEED
|
CONFIG.FEDERATION_DHT_SEED
|
||||||
? Buffer.alloc(KEY_SECRET_SEEDBYTES, CONFIG.FEDERATION_DHT_SEED)
|
? Buffer.alloc(KEY_SECRET_SEEDBYTES, CONFIG.FEDERATION_DHT_SEED)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user