fix: set sublevel valueEncoding to buffer

This commit is contained in:
Derrick Hammer 2023-09-01 23:10:18 -04:00
parent e53fd821fe
commit 384e941b09
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 6 additions and 2 deletions

View File

@ -87,7 +87,9 @@ export class P2PService extends EventEmitter {
async init(): Promise<void> {
this.localNodeId = new NodeId(this.nodeKeyPair.publicKey); // Define the NodeId constructor
this.nodesDb = this._node.db.sublevel<string, Uint8Array>("s5-nodes", {});
this.nodesDb = this._node.db.sublevel<string, Uint8Array>("s5-nodes", {
valueEncoding: "buffer",
});
}
async start(): Promise<void> {

View File

@ -35,7 +35,9 @@ export class RegistryService {
}
async init(): Promise<void> {
this.db = this.node.db.sublevel<string, Uint8Array>("s5-registry-db", {});
this.db = this.node.db.sublevel<string, Uint8Array>("s5-registry-db", {
valueEncoding: "buffer",
});
}
async set(