Skip to content

Commit 73e9aaf

Browse files
committed
Remove unused helper in ListManager.
1 parent 84f6525 commit 73e9aaf

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

lib/ListManager.js

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import assert from 'assert-plus';
55
import {generateLocalId} from './helpers.js';
66
import {IndexAllocationCache} from './IndexAllocationCache.js';
77
import {ListSource} from './ListSource.js';
8-
import {v4 as uuid} from 'uuid';
98

109
/* Notes: The following notes explain the scaling design for assigning
1110
status list (SL) indexes to VCs in a parallel fashion. This design
@@ -590,47 +589,6 @@ export class ListManager {
590589
}
591590
}
592591

593-
async _getIndexAssignmentDoc({
594-
blockAssignmentDocId, blockIndex, slSequence
595-
}) {
596-
// get `edvClient` directly; do not use cache in `documentStore` to ensure
597-
// latest docs are used
598-
const {documentStore: {edvClient}} = this;
599-
600-
// try to find existing index assignment doc
601-
const equals = {
602-
'meta.blockAssignmentDocId': blockAssignmentDocId,
603-
'meta.blockIndex': blockIndex
604-
};
605-
606-
// Note: This implementation is notably different from the
607-
// `_getListManagementDoc` because when duplicate or conflict errors arise,
608-
// we want to throw them, not ignore and read.
609-
const {documents} = await edvClient.find({equals, limit: 1});
610-
if(documents.length === 0) {
611-
const type = 'StatusListIndexAssignmentDocument';
612-
let indexAssignmentDoc = {
613-
id: await edvClient.generateId(),
614-
content: {
615-
id: `urn:uuid:${uuid()}`,
616-
type,
617-
slSequence,
618-
nextLocalIndex: 0
619-
},
620-
meta: {
621-
type,
622-
blockAssignmentDocId,
623-
blockIndex
624-
}
625-
};
626-
indexAssignmentDoc = await edvClient.update({doc: indexAssignmentDoc});
627-
return {indexAssignmentDoc};
628-
} else {
629-
const [indexAssignmentDoc] = documents;
630-
return {indexAssignmentDoc};
631-
}
632-
}
633-
634592
async _init() {
635593
const {documentStore: {edvClient}} = this;
636594
edvClient.ensureIndex({

0 commit comments

Comments
 (0)