Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -610,12 +610,6 @@ export default class BlockDbRepository implements BlockRepository {
[eventIds],
);

if (blockRows.length !== eventIds.length) {
throw new Error(
`[ERROR][DB][DATA_CORRUPT] Fetched blocks count (${blockRows.length}) does not match event IDs count (${eventIds.length}).`,
);
}

const blockMap = blockRows.reduce(
(acum, row) => ({
...acum,
Expand Down Expand Up @@ -663,12 +657,6 @@ export default class BlockDbRepository implements BlockRepository {
[transactionIds],
);

if (blockRows.length !== transactionIds.length) {
throw new Error(
`[ERROR][DB][DATA_CORRUPT] Fetched blocks count (${blockRows.length}) does not match transaction IDs count (${transactionIds.length}).`,
);
}

const blockMap = blockRows.reduce(
(acum, row) => ({
...acum,
Expand Down Expand Up @@ -714,12 +702,6 @@ export default class BlockDbRepository implements BlockRepository {
[hashes],
);

if (blockRows.length !== hashes.length) {
throw new Error(
`[ERROR][DB][DATA_CORRUPT] Fetched blocks count (${blockRows.length}) does not match requested hashes count (${hashes.length}).`,
);
}

const blockMap = blockRows.reduce(
(acum, row) => ({
...acum,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,12 +772,6 @@ export default class TransactionDbRepository implements TransactionRepository {
[eventIds],
);

if (rows.length !== eventIds.length) {
throw new Error(
`[ERROR][DB][DATA_CORRUPT] Fetched blocks count (${rows.length}) does not match event IDs count (${eventIds.length}).`,
);
}

const transactionMap = rows.reduce(
(acum, row) => ({
...acum,
Expand Down