This commit is contained in:
aozhiwei 2023-07-12 20:35:28 +08:00
parent f396e0f650
commit b846141d7f

View File

@ -104,7 +104,7 @@ class PullBcEvent extends BaseService {
async getFromBlock() { async getFromBlock() {
const logHead = this.getInstanceName() + ' getFromBlock: '; const logHead = this.getInstanceName() + ' getFromBlock: ';
const firstBlockNumber = this.getInitBlock(); const firstBlockNumber = this.getInitBlock();
while (this.lastBlockNumber < 1) { while (this.lastBlockNumber < 1) {
try { try {
const {err, row} = await this.conn.ormSelectOne( const {err, row} = await this.conn.ormSelectOne(
@ -129,7 +129,7 @@ class PullBcEvent extends BaseService {
continue; continue;
} catch (err) { } catch (err) {
utils.safeDumpErrStack(err); utils.safeDumpErrStack(err);
log.error(err); log.error(logHead + err);
} }
await utils.sleep(5000 + utils.randRange(500, 1500)); await utils.sleep(5000 + utils.randRange(500, 1500));
} }