mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Add BroadcastTransaction utility usage in Chain interface
Access through a broadcastTransaction method. Add a wait_callback flag to turn off race protection when wallet already track its tx being in mempool Standardise highfee, absurdfee variable name to max_tx_fee We drop the P2P check in BroadcastTransaction as g_connman is only called by RPCs and the wallet scheduler, both of which are initialized after g_connman is assigned and stopped before g_connman is reset.
This commit is contained in:
@@ -810,14 +810,14 @@ static UniValue sendrawtransaction(const JSONRPCRequest& request)
|
||||
max_raw_tx_fee = fr.GetFee((weight+3)/4);
|
||||
}
|
||||
|
||||
uint256 txid;
|
||||
std::string err_string;
|
||||
const TransactionError err = BroadcastTransaction(tx, txid, err_string, max_raw_tx_fee);
|
||||
AssertLockNotHeld(cs_main);
|
||||
const TransactionError err = BroadcastTransaction(tx, err_string, max_raw_tx_fee, /*relay*/ true, /*wait_callback*/ true);
|
||||
if (TransactionError::OK != err) {
|
||||
throw JSONRPCTransactionError(err, err_string);
|
||||
}
|
||||
|
||||
return txid.GetHex();
|
||||
return tx->GetHash().GetHex();
|
||||
}
|
||||
|
||||
static UniValue testmempoolaccept(const JSONRPCRequest& request)
|
||||
|
||||
Reference in New Issue
Block a user