mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
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.
This commit is contained in:
@@ -261,6 +261,10 @@ public:
|
||||
LOCK(::cs_main);
|
||||
return chainman().ActiveChainstate().CoinsTip().GetCoin(output, coin);
|
||||
}
|
||||
TransactionError broadcastTransaction(CTransactionRef tx, CAmount max_tx_fee, std::string& err_string) override
|
||||
{
|
||||
return BroadcastTransaction(*m_context, std::move(tx), err_string, max_tx_fee, /*relay=*/ true, /*wait_callback=*/ false);
|
||||
}
|
||||
WalletClient& walletClient() override
|
||||
{
|
||||
return *Assert(m_context->wallet_client);
|
||||
|
||||
Reference in New Issue
Block a user