This commit is contained in:
aozhiwei 2023-07-03 15:16:35 +08:00
parent f7abe9f90c
commit fbb9a28159

View File

@ -20,13 +20,28 @@ class BcSpider extends BaseTask {
}
async initNet(net) {
const initInstance = (instance) => {
instance['pullCount'] = 0;
instance['eventCount'] = 0;
instance['fromBlock'] = 0;
instance['toBlock'] = 0;
instance['currBlock'] = 0;
};
const events = [];
net['Events'].forEach
(
(eventConf) => {
const event = {
'conf': eventConf,
'info': {
'pullCount': 0,
'eventCount': 0,
'fromBlock': 0,
'toBlock': 0,
'currBlock': 0
}
};
events.push(event);
});
}
createPullEventService() {
const bc = serviceFactory.create('BlockChain');
const pullEventService = service.create();
return pullEventService;
}
}