1
This commit is contained in:
parent
73107aaf57
commit
e5806b12d2
@ -6,10 +6,9 @@ const BaseService = require('./baseservice');
|
|||||||
|
|
||||||
class PullDbEvent extends BaseService {
|
class PullDbEvent extends BaseService {
|
||||||
|
|
||||||
async init(bc, net, event) {
|
async init(net, event) {
|
||||||
const {err, conn} = await app.getDbConn('BcEventDb0');
|
const {err, conn} = await app.getDbConn('BcEventDb0');
|
||||||
this.conn = conn;
|
this.conn = conn;
|
||||||
this.lastBlockNumber = 0;
|
|
||||||
this.net = net;
|
this.net = net;
|
||||||
this.event = event;
|
this.event = event;
|
||||||
this.eventConf = this.event['eventConf'];
|
this.eventConf = this.event['eventConf'];
|
||||||
@ -20,7 +19,7 @@ class PullDbEvent extends BaseService {
|
|||||||
async start() {
|
async start() {
|
||||||
while (true) {
|
while (true) {
|
||||||
await this.pullEvent();
|
await this.pullEvent();
|
||||||
await utils.sleep(8000 + utils.randRange(500, 1500));
|
await utils.sleep(500 + utils.randRange(500, 1500));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +32,7 @@ class PullDbEvent extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getContractAddress() {
|
getContractAddress() {
|
||||||
return this.bc.getContractAddressByName(this.getContractName());
|
//return this.bc.getContractAddressByName(this.getContractName());
|
||||||
}
|
}
|
||||||
|
|
||||||
getContractName() {
|
getContractName() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user