diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2021-06-16 14:49:09 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2021-10-05 11:10:47 -0400 |
commit | a032fa30d282fa69c304e0afd1f95f67c55d22e3 (patch) | |
tree | c4aea56786decc54ff8474a67c604530097d8b96 /src/interfaces | |
parent | 113b863f0773999497f952daa6539a03a66a9de3 (diff) | |
download | bitcoin-a032fa30d282fa69c304e0afd1f95f67c55d22e3.tar.xz |
multiprocess: add interfaces::ExternalSigner class
Add interfaces::ExternalSigner to let signer objects be passed between
processes and signer code to run in the original process, without
multiple processes linking and running signer code.
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/node.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/interfaces/node.h b/src/interfaces/node.h index 34fdde3774..48d4fd3ee2 100644 --- a/src/interfaces/node.h +++ b/src/interfaces/node.h @@ -6,7 +6,6 @@ #define BITCOIN_INTERFACES_NODE_H #include <consensus/amount.h> -#include <external_signer.h> #include <net.h> // For NodeId #include <net_types.h> // For banmap_t #include <netaddress.h> // For Network @@ -50,6 +49,16 @@ struct BlockAndHeaderTipInfo double verification_progress; }; +//! External signer interface used by the GUI. +class ExternalSigner +{ +public: + virtual ~ExternalSigner() {}; + + //! Get signer display name + virtual std::string getName() = 0; +}; + //! Top-level interface for a bitcoin node (bitcoind process). class Node { @@ -111,8 +120,8 @@ public: //! Disconnect node by id. virtual bool disconnectById(NodeId id) = 0; - //! List external signers - virtual std::vector<ExternalSigner> externalSigners() = 0; + //! Return list of external signers (attached devices which can sign transactions). + virtual std::vector<std::unique_ptr<ExternalSigner>> listExternalSigners() = 0; //! Get total bytes recv. virtual int64_t getTotalBytesRecv() = 0; |