Skip to content

Latest commit

 

History

History
103 lines (48 loc) · 1.29 KB

File metadata and controls

103 lines (48 loc) · 1.29 KB

Home > @holochain/tryorama > dhtSync

dhtSync() function

A utility function to wait until all conductors' DhtOps have been integrated, and are identical for a given DNA.

Signature:

dhtSync: (players: PlayerApp[], dnaHash: DnaHash, intervalMs?: number, timeoutMs?: number) => Promise<void>

Parameters

Parameter

Type

Description

players

PlayerApp[]

Array of players.

dnaHash

DnaHash

DNA hash to compare integrated DhtOps from.

intervalMs

number

(Optional) Interval to pause between comparisons (defaults to 500 milliseconds).

timeoutMs

number

(Optional) A timeout for the delay (defaults to 60000 milliseconds).

**Returns:**

Promise<void>

A promise that is resolved after all agents' DHT states match.