diff --git a/server/web3bcspider/services/pull_bcevent.js b/server/web3bcspider/services/pull_bcevent.js index 1561d31..ba1b581 100644 --- a/server/web3bcspider/services/pull_bcevent.js +++ b/server/web3bcspider/services/pull_bcevent.js @@ -6,12 +6,14 @@ const BaseService = require('./baseservice'); class PullBcEvent extends BaseService { - async init(bc, conn, instance, cb) { + async init(bc, net, event) { this.conn = conn; this.instance = instance; this.cb = cb; this.lastBlockNumber = 0; this.bc = bc; + this.net = net; + this.event = event; await this.start(); } @@ -60,7 +62,9 @@ class PullBcEvent extends BaseService { } 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) {