1
This commit is contained in:
parent
2068c5f840
commit
b810a21eca
@ -119,6 +119,7 @@ async function init() {
|
||||
web3ConfHash[netId] = {
|
||||
'Web3': utils.readJsonFromFile(netDir + 'web3.json'),
|
||||
'Contract': utils.readJsonFromFile(netDir + 'contract.json'),
|
||||
'Events': net['events'],
|
||||
};
|
||||
});
|
||||
}
|
||||
@ -184,7 +185,7 @@ function getNetList() {
|
||||
const netList = [];
|
||||
const keys = Object.keys(web3ConfHash);
|
||||
for (let i = 0; i < keys.length; ++i) {
|
||||
netList.push(keys[i]);
|
||||
netList.push(web3ConfHash[keys[i]]);
|
||||
}
|
||||
return netList;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ const sync = require("j7/sync");
|
||||
const log = require("j7/log");
|
||||
const metaFactory = require('../metadata/factory');
|
||||
const bcClass = require('../blockchain');
|
||||
const BaseService = require('./baseservice');
|
||||
|
||||
const netIdHash = {};
|
||||
|
||||
|
@ -12,8 +12,8 @@ function add(clsNames, modName) {
|
||||
}
|
||||
|
||||
async function init() {
|
||||
add('BlockChain', 'blockchain');
|
||||
add('PullBcEvent', 'pull_bcevent');
|
||||
add(['BlockChain'], 'blockchain');
|
||||
add(['PullBcEvent'], 'pull_bcevent');
|
||||
}
|
||||
|
||||
function create(name, session) {
|
||||
|
@ -20,6 +20,7 @@ class BcSpider extends BaseTask {
|
||||
|
||||
async initNet(net) {
|
||||
const events = [];
|
||||
console.log(net);
|
||||
net['Events'].forEach
|
||||
(
|
||||
(eventConf) => {
|
||||
|
@ -14,11 +14,14 @@ function add(clsNames, modName) {
|
||||
}
|
||||
|
||||
async function init() {
|
||||
add('BcSpider', 'bcspider');
|
||||
add(['BcSpider'], 'bcspider');
|
||||
const initTasks = [
|
||||
'BcSpider'
|
||||
];
|
||||
await utils.serial(
|
||||
[
|
||||
'BcSpider'
|
||||
],
|
||||
async (name) =>
|
||||
{
|
||||
const task = create(name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user