This commit is contained in:
aozhiwei 2023-07-03 17:18:25 +08:00
parent 6308473814
commit 6acd5ca2a5

View File

@ -62,7 +62,7 @@ class PullBcEvent extends BaseService {
getInstanceName() {
const eventConf = this.event['eventConf'];
const instName = this.net['net_id'] + '.' + eventConf['contract_name'] + eventConf['event_name'] ;
const instName = this.getNetId() + '.' + eventConf['contract_name'] + eventConf['event_name'] ;
return instName;
}
@ -87,9 +87,9 @@ class PullBcEvent extends BaseService {
while (this.lastBlockNumber < 1) {
try {
const {err, row} = await this.conn.ormSelectOne(
't_parameter',
't_block',
[
['name', this.getBlockNumberDbName()]
['net_id', this.getNetId()]
]
);
if (!err) {
@ -190,6 +190,10 @@ class PullBcEvent extends BaseService {
return this.instance['name'] + '.' + this.instance['eventName'] + '.last_block_number.' + this.bc.getNetId();
}
getNetId() {
return this.net['net_id'];
}
}
module.exports = PullBcEvent;