aboutsummaryrefslogtreecommitdiff
path: root/src/qt/psbtoperationsdialog.cpp
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/qt/psbtoperationsdialog.cpp
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/qt/psbtoperationsdialog.cpp')
-rw-r--r--src/qt/psbtoperationsdialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/psbtoperationsdialog.cpp b/src/qt/psbtoperationsdialog.cpp
index 34d56e5506..3e598bfab9 100644
--- a/src/qt/psbtoperationsdialog.cpp
+++ b/src/qt/psbtoperationsdialog.cpp
@@ -110,8 +110,8 @@ void PSBTOperationsDialog::broadcastTransaction()
CTransactionRef tx = MakeTransactionRef(mtx);
std::string err_string;
- TransactionError error = BroadcastTransaction(
- *m_client_model->node().context(), tx, err_string, DEFAULT_MAX_RAW_TX_FEE_RATE.GetFeePerK(), /* relay */ true, /* await_callback */ false);
+ TransactionError error =
+ m_client_model->node().broadcastTransaction(tx, DEFAULT_MAX_RAW_TX_FEE_RATE.GetFeePerK(), err_string);
if (error == TransactionError::OK) {
showStatus(tr("Transaction broadcast successfully! Transaction ID: %1")