1
This commit is contained in:
parent
e98af7e2cf
commit
efcf91d7da
@ -6,12 +6,14 @@ const BaseService = require('./baseservice');
|
|||||||
|
|
||||||
class PullBcEvent extends BaseService {
|
class PullBcEvent extends BaseService {
|
||||||
|
|
||||||
async init(bc, conn, instance, cb) {
|
async init(bc, net, event) {
|
||||||
this.conn = conn;
|
this.conn = conn;
|
||||||
this.instance = instance;
|
this.instance = instance;
|
||||||
this.cb = cb;
|
this.cb = cb;
|
||||||
this.lastBlockNumber = 0;
|
this.lastBlockNumber = 0;
|
||||||
this.bc = bc;
|
this.bc = bc;
|
||||||
|
this.net = net;
|
||||||
|
this.event = event;
|
||||||
await this.start();
|
await this.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +62,9 @@ class PullBcEvent extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getInstanceName() {
|
getInstanceName() {
|
||||||
return this.instance['name'];
|
const eventConf = this.event['eventConf'];
|
||||||
|
const instName = this.net['net_id'] + '.' + eventConf['contract_name'] + eventConf['event_name'] ;
|
||||||
|
return instName;
|
||||||
}
|
}
|
||||||
|
|
||||||
async processEvents(events, toBlock) {
|
async processEvents(events, toBlock) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user