Duplicated db blocks insertion attempts are expected
This commit is contained in:
parent
1ada92f03e
commit
12b53d9ace
@ -46,8 +46,12 @@ class BlocksRepository {
|
|||||||
];
|
];
|
||||||
|
|
||||||
await connection.query(query, params);
|
await connection.query(query, params);
|
||||||
} catch (e) {
|
} catch (e: any) {
|
||||||
logger.err('$saveBlockInDatabase() error' + (e instanceof Error ? e.message : e));
|
if (e.errno === 1062) { // ER_DUP_ENTRY
|
||||||
|
logger.debug(`$saveBlockInDatabase() - Block ${block.height} has already been indexed, ignoring`);
|
||||||
|
} else {
|
||||||
|
logger.err('$saveBlockInDatabase() error' + (e instanceof Error ? e.message : e));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
connection.release();
|
connection.release();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user