Skip to content

Commit

Permalink
chore: fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jun 16, 2023
1 parent acbc997 commit f301b1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/libp2p/src/registrar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ export class DefaultRegistrar implements Registrar {
* Register handlers for a set of multicodecs given
*/
async register (protocol: string, topology: Topology): Promise<string> {
if (topology == null) {
throw new CodeError('invalid topology', codes.ERR_INVALID_PARAMETERS)
}

// Create topology
const id = `${(Math.random() * 1e9).toString(36)}${Date.now()}`

Expand Down

0 comments on commit f301b1f

Please sign in to comment.