From b152fb564a98c43b31f07bf33768dead7289f3be Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 5 Sep 2023 02:12:38 +0000 Subject: [PATCH] Bugfix: RPC/Mempool: Pass CFeeRate to BroadcastTransaction to correctly account for non-weight vsize Github-Pull: #28345 Rebased-From: ae232c72384c4b2b0cacb85eaeedd79fa78a9f73 --- src/rpc/mempool.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/rpc/mempool.cpp b/src/rpc/mempool.cpp index 927b4ce1fc..6d47ee4b75 100644 --- a/src/rpc/mempool.cpp +++ b/src/rpc/mempool.cpp @@ -85,13 +85,10 @@ static RPCHelpMan sendrawtransaction() DEFAULT_MAX_RAW_TX_FEE_RATE : CFeeRate(AmountFromValue(request.params[1])); - int64_t virtual_size = GetVirtualTransactionSize(*tx); - CAmount max_raw_tx_fee = max_raw_tx_fee_rate.GetFee(virtual_size); - std::string err_string; AssertLockNotHeld(cs_main); NodeContext& node = EnsureAnyNodeContext(request.context); - const TransactionError err = BroadcastTransaction(node, tx, err_string, max_raw_tx_fee, /*relay=*/true, /*wait_callback=*/true); + const TransactionError err = BroadcastTransaction(node, tx, err_string, max_raw_tx_fee_rate, /*relay=*/true, /*wait_callback=*/true); if (TransactionError::OK != err) { throw JSONRPCTransactionError(err, err_string); }