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) { async initNet(net) {
const initInstance = (instance) => { const events = [];
instance['pullCount'] = 0; net['Events'].forEach
instance['eventCount'] = 0; (
instance['fromBlock'] = 0; (eventConf) => {
instance['toBlock'] = 0; const event = {
instance['currBlock'] = 0; '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;
} }
} }