diff options
author | W. J. van der Laan <laanwj@protonmail.com> | 2021-11-15 17:12:05 +0100 |
---|---|---|
committer | W. J. van der Laan <laanwj@protonmail.com> | 2021-11-15 17:13:23 +0100 |
commit | 1ba74123f9319465381a4351c83d04aa97ac3707 (patch) | |
tree | 8073ec2766a812dcbada247a5c0200bc18137f25 /src/interfaces | |
parent | 36d184d0c876b0d296787a82de742a18d1c13015 (diff) | |
parent | a032fa30d282fa69c304e0afd1f95f67c55d22e3 (diff) |
Merge bitcoin/bitcoin#23004: multiprocess: add interfaces::ExternalSigner class
a032fa30d282fa69c304e0afd1f95f67c55d22e3 multiprocess: add interfaces::ExternalSigner class (Russell Yanofsky)
Pull request description:
Add `interfaces::ExternalSigner` class to let signer objects be passed between processes and let signer code run in the original process where the object was created.
---
This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10).
ACKs for top commit:
laanwj:
Concept and code review ACK a032fa30d282fa69c304e0afd1f95f67c55d22e3
hebasto:
re-ACK a032fa30d282fa69c304e0afd1f95f67c55d22e3
Tree-SHA512: 99a729fb3a64d010e142cc778a9f1f358e58345b77faaf2664de7d2277715d59df3352326e8f0f2a6628038670eaa4556310a549079fb28af6d2eeb05aea1460
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; |