diff --git a/src/node/transaction.cpp b/src/node/transaction.cpp index ee3bdd1cbf5..bff82f21560 100644 --- a/src/node/transaction.cpp +++ b/src/node/transaction.cpp @@ -15,8 +15,6 @@ #include #include -#include - namespace node { static TransactionError HandleATMPError(const TxValidationState& state, std::string& err_string_out) { @@ -45,7 +43,6 @@ TransactionError BroadcastTransaction(NodeContext& node, assert(node.mempool); assert(node.peerman); - std::promise promise; Txid txid = tx->GetHash(); Wtxid wtxid = tx->GetWitnessHash(); bool callback_set = false; @@ -118,9 +115,6 @@ TransactionError BroadcastTransaction(NodeContext& node, // with a transaction to/from their wallet, immediately call some // wallet RPC, and get a stale result because callbacks have not // yet been processed. - node.validation_signals->CallFunctionInValidationInterfaceQueue([&promise] { - promise.set_value(); - }); callback_set = true; } } @@ -129,7 +123,7 @@ TransactionError BroadcastTransaction(NodeContext& node, if (callback_set) { // Wait until Validation Interface clients have been notified of the // transaction entering the mempool. - promise.get_future().wait(); + node.validation_signals->SyncWithValidationInterfaceQueue(); } switch (broadcast_method) {