mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
RPC: Add new getzmqnotifications method.
This adds a new RPC method "getzmqnotifications", which returns information about all active ZMQ notification endpoints. This is useful for software that layers on top of bitcoind, so it can verify that ZeroMQ is enabled and also figure out where it should listen. See https://github.com/bitcoin/bitcoin/issues/13526.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2015-2017 The Bitcoin Core developers
|
||||
// Copyright (c) 2015-2018 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -29,6 +29,15 @@ CZMQNotificationInterface::~CZMQNotificationInterface()
|
||||
}
|
||||
}
|
||||
|
||||
std::list<const CZMQAbstractNotifier*> CZMQNotificationInterface::GetActiveNotifiers() const
|
||||
{
|
||||
std::list<const CZMQAbstractNotifier*> result;
|
||||
for (const auto* n : notifiers) {
|
||||
result.push_back(n);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
CZMQNotificationInterface* CZMQNotificationInterface::Create()
|
||||
{
|
||||
CZMQNotificationInterface* notificationInterface = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user