public Api(string node) { netnode = node; switch (netnode) { case "testnet": innerTxService = new InnerTxService { mh = mh, block_mongodbConnStr = mh.block_mongodbConnStr_testnet, block_mongodbDatabase = mh.block_mongodbDatabase_testnet, analy_mongodbConnStr = mh.analy_mongodbConnStr_testnet, analy_mongodbDatabase = mh.analy_mongodbDatabase_testnet }; contractService = new ContractService { mh = mh, Block_mongodbConnStr = mh.block_mongodbConnStr_testnet, Block_mongodbDatabase = mh.block_mongodbDatabase_testnet, Notify_mongodbConnStr = mh.notify_mongodbConnStr_testnet, Notify_mongodbDatabase = mh.notify_mongodbDatabase_testnet, Analysis_mongodbConnStr = mh.analy_mongodbConnStr_testnet, Analysis_mongodbDatabase = mh.analy_mongodbDatabase_testnet }; daoService = new DaoService { mh = mh, mongodbConnStr = mh.dao_mongodbConnStr_testnet, mongodbDatabase = mh.dao_mongodbDatabase_testnet }; nnsDomainCrediteService = new NNSDomainCreditService { mh = mh, mongodbConnStr = mh.notify_mongodbConnStr_testnet, mongodbDatabase = mh.notify_mongodbDatabase_testnet, }; blockService = new BlockService { mh = mh, Block_mongodbConnStr = mh.block_mongodbConnStr_testnet, Block_mongodbDatabase = mh.block_mongodbDatabase_testnet, }; analyService = new AnalyService { mh = mh, block_mongodbConnStr = mh.block_mongodbConnStr_testnet, block_mongodbDatabase = mh.block_mongodbDatabase_testnet, analy_mongodbConnStr = mh.analy_mongodbConnStr_testnet, analy_mongodbDatabase = mh.analy_mongodbDatabase_testnet, }; assetService = new AssetService { mh = mh, mongodbConnStr = mh.block_mongodbConnStr_testnet, mongodbDatabase = mh.block_mongodbDatabase_testnet, }; nnsService = new NNSService { mh = mh, block_mongodbConnStr = mh.block_mongodbConnStr_testnet, block_mongodbDatabase = mh.block_mongodbDatabase_testnet, analy_mongodbConnStr = mh.analy_mongodbConnStr_testnet, analy_mongodbDatabase = mh.analy_mongodbDatabase_testnet, notify_mongodbConnStr = mh.notify_mongodbConnStr_testnet, notify_mongodbDatabase = mh.notify_mongodbDatabase_testnet, //bonusSgas_mongodbConnStr = mh.bonusSgas_mongodbConnStr_testnet, bonusSgas_mongodbConnStr = mh.snapshot_mongodbConnStr_testnet, //bonusSgas_mongodbDatabase = mh.bonusSgas_mongodbDatabase_testnet, bonusSgas_mongodbDatabase = mh.snapshot_mongodbDatabase_testnet, bonusStatisticCol = mh.bonusStatisticCol_testnet, bonusSgasCol = mh.bonusSgasCol_testnet, id_sgas = mh.id_sgas_testnet, auctionStateColl = mh.auctionStateColl_testnet, bonusAddress = mh.bonusAddress_testnet, //nelJsonRPCUrl = mh.nelJsonRPCUrl_testnet }; domainService = new DomainService { mh = mh, Block_mongodbConnStr = mh.block_mongodbConnStr_testnet, Block_mongodbDatabase = mh.block_mongodbDatabase_testnet, Notify_mongodbConnStr = mh.notify_mongodbConnStr_testnet, Notify_mongodbDatabase = mh.notify_mongodbDatabase_testnet, auctionStateColl = mh.auctionStateColl_testnet, bonusAddress = mh.bonusAddress_testnet, NNsfixedSellingAddr = mh.NNsfixedSellingAddr_testnet, NNSfixedSellingColl = mh.NNSfixedSellingColl_testnet, domainCenterColl = mh.domainCenterColl_testnet, }; break; case "mainnet": innerTxService = new InnerTxService { mh = mh, block_mongodbConnStr = mh.block_mongodbConnStr_mainnet, block_mongodbDatabase = mh.block_mongodbDatabase_mainnet, analy_mongodbConnStr = mh.analy_mongodbConnStr_mainnet, analy_mongodbDatabase = mh.analy_mongodbDatabase_mainnet }; contractService = new ContractService { mh = mh, Block_mongodbConnStr = mh.block_mongodbConnStr_mainnet, Block_mongodbDatabase = mh.block_mongodbDatabase_mainnet, Notify_mongodbConnStr = mh.notify_mongodbConnStr_mainnet, Notify_mongodbDatabase = mh.notify_mongodbDatabase_mainnet, Analysis_mongodbConnStr = mh.analy_mongodbConnStr_mainnet, Analysis_mongodbDatabase = mh.analy_mongodbDatabase_mainnet }; nnsDomainCrediteService = new NNSDomainCreditService { mh = mh, mongodbConnStr = mh.notify_mongodbConnStr_mainnet, mongodbDatabase = mh.notify_mongodbDatabase_mainnet, }; blockService = new BlockService { mh = mh, Block_mongodbConnStr = mh.block_mongodbConnStr_mainnet, Block_mongodbDatabase = mh.block_mongodbDatabase_mainnet, Analy_mongodbConnStr = mh.analy_mongodbConnStr_mainnet, Analy_mongodbDatabase = mh.analy_mongodbDatabase_mainnet, Notify_mongodbConnStr = mh.notify_mongodbConnStr_mainnet, Notify_mongodbDatabase = mh.notify_mongodbDatabase_mainnet, }; analyService = new AnalyService { mh = mh, block_mongodbConnStr = mh.block_mongodbConnStr_mainnet, block_mongodbDatabase = mh.block_mongodbDatabase_mainnet, analy_mongodbConnStr = mh.analy_mongodbConnStr_mainnet, analy_mongodbDatabase = mh.analy_mongodbDatabase_mainnet, }; assetService = new AssetService { mh = mh, mongodbConnStr = mh.block_mongodbConnStr_mainnet, mongodbDatabase = mh.block_mongodbDatabase_mainnet, }; nnsService = new NNSService { mh = mh, block_mongodbConnStr = mh.block_mongodbConnStr_mainnet, block_mongodbDatabase = mh.block_mongodbDatabase_mainnet, analy_mongodbConnStr = mh.analy_mongodbConnStr_mainnet, analy_mongodbDatabase = mh.analy_mongodbDatabase_mainnet, notify_mongodbConnStr = mh.notify_mongodbConnStr_mainnet, notify_mongodbDatabase = mh.notify_mongodbDatabase_mainnet, //bonusSgas_mongodbConnStr = mh.bonusSgas_mongodbConnStr_mainnet, bonusSgas_mongodbConnStr = mh.snapshot_mongodbConnStr_mainnet, //bonusSgas_mongodbDatabase = mh.bonusSgas_mongodbDatabase_mainnet, bonusSgas_mongodbDatabase = mh.snapshot_mongodbDatabase_mainnet, bonusStatisticCol = mh.bonusStatisticCol_mainnet, bonusSgasCol = mh.bonusSgasCol_mainnet, id_sgas = mh.id_sgas_mainnet, auctionStateColl = mh.auctionStateColl_mainnet, bonusAddress = mh.bonusAddress_mainnet, //nelJsonRPCUrl = mh.nelJsonRPCUrl_mainnet }; domainService = new DomainService { mh = mh, Block_mongodbConnStr = mh.block_mongodbConnStr_mainnet, Block_mongodbDatabase = mh.block_mongodbDatabase_mainnet, Notify_mongodbConnStr = mh.notify_mongodbConnStr_mainnet, Notify_mongodbDatabase = mh.notify_mongodbDatabase_mainnet, auctionStateColl = mh.auctionStateColl_mainnet, bonusAddress = mh.bonusAddress_mainnet, NNsfixedSellingAddr = mh.NNsfixedSellingAddr_mainnet, NNSfixedSellingColl = mh.NNSfixedSellingColl_mainnet, domainCenterColl = mh.domainCenterColl_mainnet, }; break; } initMonitor(); }
public Api(string node) { netnode = node; switch (netnode) { case "testnet": analyService = new AnalyService { block_mongodbConnStr = mh.block_mongodbConnStr_testnet, block_mongodbDatabase = mh.block_mongodbDatabase_testnet, analy_mongodbConnStr = mh.analy_mongodbConnStr_testnet, analy_mongodbDatabase = mh.analy_mongodbDatabase_testnet, mh = mh }; assetService = new AssetService { mongodbConnStr = mh.block_mongodbConnStr_testnet, mongodbDatabase = mh.block_mongodbDatabase_testnet, mh = mh }; nnsService = new NNSService { analy_mongodbConnStr = mh.analy_mongodbConnStr_testnet, analy_mongodbConnDatabase = mh.analy_mongodbDatabase_testnet, bonusStatisticCol = mh.bonusStatisticCol_testnet, notify_mongodbConnStr = mh.notify_mongodbConnStr_testnet, notify_mongodbDatabase = mh.notify_mongodbDatabase_testnet, mh = mh, bonusSgas_mongodbConnStr = mh.bonusSgas_mongodbConnStr_testnet, bonusSgas_mongodbDatabase = mh.bonusSgas_mongodbDatabase_testnet, bonusSgasCol = mh.bonusSgasCol_testnet, id_sgas = mh.id_sgas_testnet, auctionStateColl = mh.auctionStateColl_testnet, bonusAddress = mh.bonusAddress_testnet, nelJsonRPCUrl = mh.nelJsonRPCUrl_testnet }; commonService = new CommonService { mh = mh, Block_mongodbConnStr = mh.block_mongodbConnStr_testnet, Block_mongodbDatabase = mh.block_mongodbDatabase_testnet, Notify_mongodbConnStr = mh.notify_mongodbConnStr_testnet, Notify_mongodbDatabase = mh.notify_mongodbDatabase_testnet, auctionStateColl = mh.auctionStateColl_testnet, bonusAddress = mh.bonusAddress_testnet, }; break; case "mainnet": analyService = new AnalyService { block_mongodbConnStr = mh.block_mongodbConnStr_mainnet, block_mongodbDatabase = mh.block_mongodbDatabase_mainnet, analy_mongodbConnStr = mh.analy_mongodbConnStr_mainnet, analy_mongodbDatabase = mh.analy_mongodbDatabase_mainnet, mh = mh }; assetService = new AssetService { mongodbConnStr = mh.block_mongodbConnStr_mainnet, mongodbDatabase = mh.block_mongodbDatabase_mainnet, mh = mh }; nnsService = new NNSService { analy_mongodbConnStr = mh.analy_mongodbConnStr_mainnet, analy_mongodbConnDatabase = mh.analy_mongodbDatabase_mainnet, bonusStatisticCol = mh.bonusStatisticCol_mainnet, notify_mongodbConnStr = mh.notify_mongodbConnStr_mainnet, notify_mongodbDatabase = mh.notify_mongodbDatabase_mainnet, mh = mh, bonusSgas_mongodbConnStr = mh.bonusSgas_mongodbConnStr_mainnet, bonusSgas_mongodbDatabase = mh.bonusSgas_mongodbDatabase_mainnet, bonusSgasCol = mh.bonusSgasCol_mainnet, id_sgas = mh.id_sgas_mainnet, auctionStateColl = mh.auctionStateColl_mainnet, bonusAddress = mh.bonusAddress_mainnet, nelJsonRPCUrl = mh.nelJsonRPCUrl_mainnet }; commonService = new CommonService { mh = mh, Block_mongodbConnStr = mh.block_mongodbConnStr_mainnet, Block_mongodbDatabase = mh.block_mongodbDatabase_mainnet, Notify_mongodbConnStr = mh.notify_mongodbConnStr_mainnet, Notify_mongodbDatabase = mh.notify_mongodbDatabase_mainnet, auctionStateColl = mh.auctionStateColl_mainnet, bonusAddress = mh.bonusAddress_mainnet, }; break; } }