1
This commit is contained in:
parent
f7abe9f90c
commit
fbb9a28159
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user