Changeset View
Changeset View
Standalone View
Standalone View
src/zmq/zmqnotificationinterface.cpp
Show All 38 Lines | factories["pubrawblock"] = | ||||
CZMQAbstractNotifier::Create<CZMQPublishRawBlockNotifier>; | CZMQAbstractNotifier::Create<CZMQPublishRawBlockNotifier>; | ||||
factories["pubrawtx"] = | factories["pubrawtx"] = | ||||
CZMQAbstractNotifier::Create<CZMQPublishRawTransactionNotifier>; | CZMQAbstractNotifier::Create<CZMQPublishRawTransactionNotifier>; | ||||
for (std::map<std::string, CZMQNotifierFactory>::const_iterator i = | for (std::map<std::string, CZMQNotifierFactory>::const_iterator i = | ||||
factories.begin(); | factories.begin(); | ||||
i != factories.end(); ++i) { | i != factories.end(); ++i) { | ||||
std::string arg("-zmq" + i->first); | std::string arg("-zmq" + i->first); | ||||
if (IsArgSet(arg)) { | if (gArgs.IsArgSet(arg)) { | ||||
CZMQNotifierFactory factory = i->second; | CZMQNotifierFactory factory = i->second; | ||||
std::string address = GetArg(arg, ""); | std::string address = gArgs.GetArg(arg, ""); | ||||
CZMQAbstractNotifier *notifier = factory(); | CZMQAbstractNotifier *notifier = factory(); | ||||
notifier->SetType(i->first); | notifier->SetType(i->first); | ||||
notifier->SetAddress(address); | notifier->SetAddress(address); | ||||
notifiers.push_back(notifier); | notifiers.push_back(notifier); | ||||
} | } | ||||
} | } | ||||
if (!notifiers.empty()) { | if (!notifiers.empty()) { | ||||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |