diff --git a/src/service/p2p.ts b/src/service/p2p.ts index 1a4ac84..ae83b6d 100644 --- a/src/service/p2p.ts +++ b/src/service/p2p.ts @@ -87,7 +87,9 @@ export class P2PService extends EventEmitter { async init(): Promise { this.localNodeId = new NodeId(this.nodeKeyPair.publicKey); // Define the NodeId constructor - this.nodesDb = this._node.db.sublevel("s5-nodes", {}); + this.nodesDb = this._node.db.sublevel("s5-nodes", { + valueEncoding: "buffer", + }); } async start(): Promise { diff --git a/src/service/registry.ts b/src/service/registry.ts index e96a743..39b473e 100644 --- a/src/service/registry.ts +++ b/src/service/registry.ts @@ -35,7 +35,9 @@ export class RegistryService { } async init(): Promise { - this.db = this.node.db.sublevel("s5-registry-db", {}); + this.db = this.node.db.sublevel("s5-registry-db", { + valueEncoding: "buffer", + }); } async set(