1
This commit is contained in:
parent
f4a5b444c2
commit
69717bc402
@ -6,7 +6,7 @@ const log = require('j7/log');
|
||||
const metaClassList = [];
|
||||
const metaClasses = {};
|
||||
const web3ConfHash = {};
|
||||
let web3BcSpiderConf = null;
|
||||
let web3DbSpiderConf = null;
|
||||
let configDir = './config/';
|
||||
|
||||
function registerMetaClass(fileName, primKey, wrapClass) {
|
||||
@ -99,9 +99,9 @@ async function init() {
|
||||
'',
|
||||
'BcNftDb'
|
||||
);
|
||||
registerMetaClass(configDir + 'web3bcspider.cluster.json',
|
||||
registerMetaClass(configDir + 'web3dbspider.cluster.json',
|
||||
'',
|
||||
'Web3BcSpider'
|
||||
'Web3DbSpider'
|
||||
);
|
||||
load();
|
||||
{
|
||||
@ -111,9 +111,9 @@ async function init() {
|
||||
traverseMetaList('BcNftDb', (dbConf, idx) => {
|
||||
app.registerDb('BcNftDb' + idx, dbConf);
|
||||
});
|
||||
traverseMetaList('Web3BcSpider', (item, idx) => {
|
||||
traverseMetaList('Web3DbSpider', (item, idx) => {
|
||||
if (item['instance_id'] == app.getInstanceId()) {
|
||||
web3BcSpiderConf = item;
|
||||
web3DbSpiderConf = item;
|
||||
item['nets'].forEach((net) => {
|
||||
const netId = net['net_id'];
|
||||
const netDir = configDir + 'nets/' + netId + '/';
|
||||
@ -187,8 +187,8 @@ function getWeb3Conf(netId) {
|
||||
return conf ? conf['Web3'] : null;
|
||||
}
|
||||
|
||||
function getWeb3BcSpiderConf() {
|
||||
return web3BcSpiderConf;
|
||||
function getWeb3DbSpiderConf() {
|
||||
return web3DbSpiderConf;
|
||||
}
|
||||
|
||||
function getContractsConf(netId) {
|
||||
@ -217,7 +217,7 @@ exports.traverseMetaList = traverseMetaList;
|
||||
exports.callMetaStatic = callMetaStatic;
|
||||
|
||||
exports.getWeb3Conf = getWeb3Conf;
|
||||
exports.getWeb3BcSpiderConf = getWeb3BcSpiderConf;
|
||||
exports.getWeb3DbSpiderConf = getWeb3DbSpiderConf;
|
||||
exports.getContractsConf = getContractsConf;
|
||||
exports.getNetList = getNetList;
|
||||
exports.getNetDir = getNetDir;
|
||||
|
Loading…
x
Reference in New Issue
Block a user