aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2021-11-12 15:20:53 -0500
committerRussell Yanofsky <russ@yanofsky.org>2021-11-12 15:20:53 -0500
commit0e0f4fdd892223766db4a83194b6576847b757f7 (patch)
tree0fd8793d1fd590aedc2b01c0841dbd2c9d6376f0 /src/interfaces
parentc9dd5c8d6e59e27af98e99d2844d6ead8eec3162 (diff)
multiprocess: Add interfaces::Node::broadCastTransaction method
This fixes a null pointer crash in the bitcoin-gui PSBT dialog. The bitcoin-gui interfaces::Node object has a null NodeContext pointer, and can't broadcast transactions directly. It needs to broadcast transactions through the bitcoin-node process instead.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/node.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/node.h b/src/interfaces/node.h
index 34fdde3774..12f2fce22b 100644
--- a/src/interfaces/node.h
+++ b/src/interfaces/node.h
@@ -31,6 +31,7 @@ class RPCTimerInterface;
class UniValue;
class proxyType;
enum class SynchronizationState;
+enum class TransactionError;
struct CNodeStateStats;
struct NodeContext;
struct bilingual_str;
@@ -174,6 +175,9 @@ public:
//! Get unspent outputs associated with a transaction.
virtual bool getUnspentOutput(const COutPoint& output, Coin& coin) = 0;
+ //! Broadcast transaction.
+ virtual TransactionError broadcastTransaction(CTransactionRef tx, CAmount max_tx_fee, std::string& err_string) = 0;
+
//! Get wallet client.
virtual WalletClient& walletClient() = 0;