Skip to content

Commit d544fa0

Browse files
Tom Trevethandelta1
authored andcommitted
scale incremental relay feerates for rbf tests to account for discount
(cherry picked from commit fc899f1)
1 parent 58c3d4b commit d544fa0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/rbf_tests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ BOOST_FIXTURE_TEST_CASE(rbf_helper_functions, TestChain100Setup)
144144
BOOST_CHECK(EntriesAndTxidsDisjoint({entry2}, {tx1->GetHash()}, unused_txid) == std::nullopt);
145145

146146
// Tests for PaysForRBF
147-
const CFeeRate incremental_relay_feerate{DEFAULT_INCREMENTAL_RELAY_FEE};
148-
const CFeeRate higher_relay_feerate{2 * DEFAULT_INCREMENTAL_RELAY_FEE};
147+
const CFeeRate incremental_relay_feerate{DEFAULT_INCREMENTAL_RELAY_FEE * 10};
148+
const CFeeRate higher_relay_feerate{2 * DEFAULT_INCREMENTAL_RELAY_FEE * 10};
149149
// Must pay at least as much as the original.
150150
BOOST_CHECK(PaysForRBF(/*original_fees=*/high_fee,
151151
/*replacement_fees=*/high_fee,
@@ -156,9 +156,9 @@ BOOST_FIXTURE_TEST_CASE(rbf_helper_functions, TestChain100Setup)
156156
BOOST_CHECK(PaysForRBF(high_fee, high_fee - 1, 1, CFeeRate(0), unused_txid).has_value());
157157
BOOST_CHECK(PaysForRBF(high_fee + 1, high_fee, 1, CFeeRate(0), unused_txid).has_value());
158158
// Additional fees must cover the replacement's vsize at incremental relay fee
159-
// BOOST_CHECK(PaysForRBF(high_fee, high_fee + 1, 2, incremental_relay_feerate, unused_txid).has_value()); // ELEMENTS FIXME
159+
BOOST_CHECK(PaysForRBF(high_fee, high_fee + 1, 2, incremental_relay_feerate, unused_txid).has_value());
160160
BOOST_CHECK(PaysForRBF(high_fee, high_fee + 2, 2, incremental_relay_feerate, unused_txid) == std::nullopt);
161-
// BOOST_CHECK(PaysForRBF(high_fee, high_fee + 2, 2, higher_relay_feerate, unused_txid).has_value()); // ELEMENTS FIXME
161+
BOOST_CHECK(PaysForRBF(high_fee, high_fee + 2, 2, higher_relay_feerate, unused_txid).has_value());
162162
BOOST_CHECK(PaysForRBF(high_fee, high_fee + 4, 2, higher_relay_feerate, unused_txid) == std::nullopt);
163163
BOOST_CHECK(PaysForRBF(low_fee, high_fee, 99999999, incremental_relay_feerate, unused_txid).has_value());
164164
BOOST_CHECK(PaysForRBF(low_fee, high_fee + 99999999, 99999999, incremental_relay_feerate, unused_txid) == std::nullopt);

0 commit comments

Comments
 (0)