diff --git a/src/interfaces/node.h b/src/interfaces/node.h index 1dd1e92e2ff..35b6160ceac 100644 --- a/src/interfaces/node.h +++ b/src/interfaces/node.h @@ -6,6 +6,7 @@ #define BITCOIN_INTERFACES_NODE_H #include // For CAmount +#include #include // For NodeId #include // For banmap_t #include // For Network @@ -110,6 +111,11 @@ class Node //! Disconnect node by id. virtual bool disconnectById(NodeId id) = 0; +#ifdef ENABLE_EXTERNAL_SIGNER + //! List external signers + virtual std::vector externalSigners() = 0; +#endif + //! Get total bytes recv. virtual int64_t getTotalBytesRecv() = 0; diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp index 8befbf5e307..171f15d4fb9 100644 --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -170,6 +170,16 @@ class NodeImpl : public Node } return false; } +#ifdef ENABLE_EXTERNAL_SIGNER + std::vector externalSigners() override + { + std::vector signers = {}; + const std::string command = gArgs.GetArg("-signer", ""); + if (command == "") return signers; + ExternalSigner::Enumerate(command, signers, Params().NetworkIDString()); + return signers; + } +#endif int64_t getTotalBytesRecv() override { return m_context->connman ? m_context->connman->GetTotalBytesRecv() : 0; } int64_t getTotalBytesSent() override { return m_context->connman ? m_context->connman->GetTotalBytesSent() : 0; } size_t getMempoolSize() override { return m_context->mempool ? m_context->mempool->size() : 0; }