v31.1-roots.1 · Commit 3: [PATCH 03/17] feat(policy): preserve cluster accounting and repair dynamic dust
src/test/rbf_tests.cpp
Before: src/test/rbf_tests.cpp · After: src/test/rbf_tests.cpp
File metadata
index 0ffe0846c253b7f7e2be5b4e61b5f2e0a7d9cbef..851d9d6f7eae1cb27c916acd968a2471aaa715cb 100644
Download original patch · Release notes
Diff rows 1–62 of 62. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
src/test/rbf_tests.cpp
CHANGED
|
@@ -351,7 +351,7 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
|
|
|
351
351
|
TryAddToMempool(pool, entry.Fee(low_fee).FromTx(low_tx));
|
|
352
352
|
|
|
353
353
|
const auto entry_low = pool.GetIter(low_tx->GetHash()).value();
|
|
354
|
-
const auto low_size = entry_low->GetAdjustedWeight();
|
|
354
|
+
const auto low_size = static_cast<int32_t>(entry_low->GetAdjustedWeight());
|
|
355
355
|
|
|
356
356
|
const auto replacement_tx = make_tx(/*inputs=*/ {m_coinbase_txns[0]}, /*output_values=*/ {9 * COIN});
|
|
357
357
|
auto entry_replacement = entry.FromTx(replacement_tx);
|
|
@@ -365,7 +365,7 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
|
|
|
365
365
|
BOOST_CHECK(replace_one.has_value());
|
|
366
366
|
std::vector<FeeFrac> expected_old_chunks{{low_fee, low_size}};
|
|
367
367
|
BOOST_CHECK(replace_one->first == expected_old_chunks);
|
|
368
|
-
std::vector<FeeFrac> expected_new_chunks{{0, entry_replacement.GetAdjustedWeight()}};
|
|
368
|
+
std::vector<FeeFrac> expected_new_chunks{{0, static_cast<int32_t>(entry_replacement.GetAdjustedWeight())}};
|
|
369
369
|
BOOST_CHECK(replace_one->second == expected_new_chunks);
|
|
370
370
|
}
|
|
371
371
|
|
|
@@ -378,7 +378,7 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
|
|
|
378
378
|
BOOST_CHECK(replace_one_fee.has_value());
|
|
379
379
|
std::vector<FeeFrac> expected_old_diagram{{low_fee, low_size}};
|
|
380
380
|
BOOST_CHECK(replace_one_fee->first == expected_old_diagram);
|
|
381
|
-
std::vector<FeeFrac> expected_new_diagram{{high_fee, entry_replacement.GetAdjustedWeight()}};
|
|
381
|
+
std::vector<FeeFrac> expected_new_diagram{{high_fee, static_cast<int32_t>(entry_replacement.GetAdjustedWeight())}};
|
|
382
382
|
BOOST_CHECK(replace_one_fee->second == expected_new_diagram);
|
|
383
383
|
}
|
|
384
384
|
|
|
@@ -386,7 +386,7 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
|
|
|
386
386
|
const auto high_tx = make_tx(/*inputs=*/ {low_tx}, /*output_values=*/ {995 * CENT});
|
|
387
387
|
TryAddToMempool(pool, entry.Fee(high_fee).FromTx(high_tx));
|
|
388
388
|
const auto entry_high = pool.GetIter(high_tx->GetHash()).value();
|
|
389
|
-
const auto high_size = entry_high->GetAdjustedWeight();
|
|
389
|
+
const auto high_size = static_cast<int32_t>(entry_high->GetAdjustedWeight());
|
|
390
390
|
|
|
391
391
|
{
|
|
392
392
|
auto changeset = pool.GetChangeSet();
|
|
@@ -397,7 +397,7 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
|
|
|
397
397
|
BOOST_CHECK(replace_single_chunk.has_value());
|
|
398
398
|
std::vector<FeeFrac> expected_old_chunks{{low_fee + high_fee, low_size + high_size}};
|
|
399
399
|
BOOST_CHECK(replace_single_chunk->first == expected_old_chunks);
|
|
400
|
-
std::vector<FeeFrac> expected_new_chunks{{high_fee, entry_replacement.GetAdjustedWeight()}};
|
|
400
|
+
std::vector<FeeFrac> expected_new_chunks{{high_fee, static_cast<int32_t>(entry_replacement.GetAdjustedWeight())}};
|
|
401
401
|
BOOST_CHECK(replace_single_chunk->second == expected_new_chunks);
|
|
402
402
|
}
|
|
403
403
|
|
|
@@ -410,7 +410,7 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
|
|
|
410
410
|
BOOST_CHECK(replace_cpfp_child.has_value());
|
|
411
411
|
std::vector<FeeFrac> expected_old_chunks{{low_fee + high_fee, low_size + high_size}};
|
|
412
412
|
BOOST_CHECK(replace_cpfp_child->first == expected_old_chunks);
|
|
413
|
-
std::vector<FeeFrac> expected_new_chunks{{high_fee, entry_replacement.GetAdjustedWeight()}, {low_fee, low_size}};
|
|
413
|
+
std::vector<FeeFrac> expected_new_chunks{{high_fee, static_cast<int32_t>(entry_replacement.GetAdjustedWeight())}, {low_fee, low_size}};
|
|
414
414
|
BOOST_CHECK(replace_cpfp_child->second == expected_new_chunks);
|
|
415
415
|
}
|
|
416
416
|
|
|
@@ -418,12 +418,12 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
|
|
|
418
418
|
const auto high_tx_2 = make_tx(/*inputs=*/ {m_coinbase_txns[1]}, /*output_values=*/ {10 * COIN});
|
|
419
419
|
TryAddToMempool(pool, entry.Fee(high_fee).FromTx(high_tx_2));
|
|
420
420
|
const auto entry_high_2 = pool.GetIter(high_tx_2->GetHash()).value();
|
|
421
|
-
const auto high_size_2 = entry_high_2->GetAdjustedWeight();
|
|
421
|
+
const auto high_size_2 = static_cast<int32_t>(entry_high_2->GetAdjustedWeight());
|
|
422
422
|
|
|
423
423
|
const auto low_tx_2 = make_tx(/*inputs=*/ {high_tx_2}, /*output_values=*/ {9 * COIN});
|
|
424
424
|
TryAddToMempool(pool, entry.Fee(low_fee).FromTx(low_tx_2));
|
|
425
425
|
const auto entry_low_2 = pool.GetIter(low_tx_2->GetHash()).value();
|
|
426
|
-
const auto low_size_2 = entry_low_2->GetAdjustedWeight();
|
|
426
|
+
const auto low_size_2 = static_cast<int32_t>(entry_low_2->GetAdjustedWeight());
|
|
427
427
|
|
|
428
428
|
{
|
|
429
429
|
auto changeset = pool.GetChangeSet();
|