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