mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 15:32:34 +02:00
node: add externalSigners to interface
This commit is contained in:
parent
62ac119f91
commit
3f845ea299
@ -6,6 +6,7 @@
|
|||||||
#define BITCOIN_INTERFACES_NODE_H
|
#define BITCOIN_INTERFACES_NODE_H
|
||||||
|
|
||||||
#include <amount.h> // For CAmount
|
#include <amount.h> // For CAmount
|
||||||
|
#include <external_signer.h>
|
||||||
#include <net.h> // For NodeId
|
#include <net.h> // For NodeId
|
||||||
#include <net_types.h> // For banmap_t
|
#include <net_types.h> // For banmap_t
|
||||||
#include <netaddress.h> // For Network
|
#include <netaddress.h> // For Network
|
||||||
@ -110,6 +111,11 @@ public:
|
|||||||
//! Disconnect node by id.
|
//! Disconnect node by id.
|
||||||
virtual bool disconnectById(NodeId id) = 0;
|
virtual bool disconnectById(NodeId id) = 0;
|
||||||
|
|
||||||
|
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||||
|
//! List external signers
|
||||||
|
virtual std::vector<ExternalSigner> externalSigners() = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
//! Get total bytes recv.
|
//! Get total bytes recv.
|
||||||
virtual int64_t getTotalBytesRecv() = 0;
|
virtual int64_t getTotalBytesRecv() = 0;
|
||||||
|
|
||||||
|
@ -170,6 +170,16 @@ public:
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_EXTERNAL_SIGNER
|
||||||
|
std::vector<ExternalSigner> externalSigners() override
|
||||||
|
{
|
||||||
|
std::vector<ExternalSigner> 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 getTotalBytesRecv() override { return m_context->connman ? m_context->connman->GetTotalBytesRecv() : 0; }
|
||||||
int64_t getTotalBytesSent() override { return m_context->connman ? m_context->connman->GetTotalBytesSent() : 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; }
|
size_t getMempoolSize() override { return m_context->mempool ? m_context->mempool->size() : 0; }
|
||||||
|
Loading…
Reference in New Issue
Block a user