mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge #15713: refactor: Replace chain relayTransactions/submitMemoryPool by higher method
fb62f128bbTidy up BroadcastTransaction() (John Newbery)b8eecf8e79Remove unused submitToMemoryPool and relayTransactions Chain interfaces (Antoine Riard)8753f5652bRemove duplicate checks in SubmitMemoryPoolAndRelay (Antoine Riard)611291c198Introduce CWalletTx::SubmitMemoryPoolAndRelay (Antoine Riard)8c8aa19b4bAdd BroadcastTransaction utility usage in Chain interface (Antoine Riard) Pull request description: Remove CWalletTx::AcceptToMemoryPool Replace CWalletTx::RelayWalletTransaction by SubmitMemoryPoolAndRelay Add a relay flag to broadcastTransaction because wasn't sure of ReacceptWalletTransactions semantic. Obviously, working on implementing https://github.com/bitcoin/bitcoin/pull/14978#issuecomment-459373984 to add the new higher-method in Node interface, will add a commit, just need more thought to do it cleanly ACKs for top commit: MarcoFalke: re-ACKfb62f128bbSjors: re-ACKfb62f128bbTree-SHA512: a7ee48b0545f537fa65cac8ed4cb24e777ab90b877d4eefb87971fa93c6a59bd555b62ad8940c6ffb40592a0bd50787d27587af99f20b56af72b415b6394251f
This commit is contained in:
@@ -814,14 +814,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