Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion yarn-project/kv-store/src/lmdb/store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('AztecLmdbStore', () => {
};

it('forks a persistent store', async () => {
const path = join(await mkdtemp(join(tmpdir(), 'aztec-store-test-')), 'main.mdb');
const path = await mkdtemp(join(tmpdir(), 'aztec-store-test-'));
const store = AztecLmdbStore.open(path, false);
await itForks(store);
});
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/kv-store/src/lmdb/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class AztecLmdbStore implements AztecKVStore {
async fork() {
const baseDir = this.path ? dirname(this.path) : tmpdir();
this.#log.debug(`Forking store with basedir ${baseDir}`);
const forkPath = join(await mkdtemp(join(baseDir, 'aztec-store-fork-')), 'root.mdb');
const forkPath = (await mkdtemp(join(baseDir, 'aztec-store-fork-'))) + (this.isEphemeral ? '/data.mdb' : '');
this.#log.verbose(`Forking store to ${forkPath}`);
await this.#rootDb.backup(forkPath, false);
const forkDb = open(forkPath, { noSync: this.isEphemeral });
Expand Down