Skip to content

Commit f433dad

Browse files
committed
node: Accept "absurdly-high-fee" and "max-fee-exceeded" reject reasons to ignore max_tx_fee
1 parent f80c8a5 commit f433dad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/node/transaction.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef t
6969
wtxid = mempool_tx->GetWitnessHash();
7070
} else {
7171
// Transaction is not already in the mempool.
72-
const bool max_tx_fee_set{(std::holds_alternative<CAmount>(max_tx_fee) ? std::get<CAmount>(max_tx_fee) : std::get<CFeeRate>(max_tx_fee).GetFeePerK()) > 0};
72+
bool max_tx_fee_set{(std::holds_alternative<CAmount>(max_tx_fee) ? std::get<CAmount>(max_tx_fee) : std::get<CFeeRate>(max_tx_fee).GetFeePerK()) > 0};
73+
if (ignore_rejects.count("absurdly-high-fee") || ignore_rejects.count("max-fee-exceeded")) {
74+
max_tx_fee_set = false;
75+
}
7376
if (max_tx_fee_set) {
7477
// First, call ATMP with test_accept and check the fee. If ATMP
7578
// fails here, return error immediately.

0 commit comments

Comments
 (0)