mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge 205877e55f into merged_master (Bitcoin PR bitcoin/bitcoin#23546)
This commit is contained in:
commit
77acfd01b8
31 changed files with 170 additions and 170 deletions
|
|
@ -85,7 +85,7 @@ void Finish(FuzzedDataProvider& fuzzed_data_provider, MockedTxPool& tx_pool, CCh
|
|||
{
|
||||
BlockAssembler::Options options;
|
||||
options.nBlockMaxWeight = fuzzed_data_provider.ConsumeIntegralInRange(0U, MAX_BLOCK_WEIGHT);
|
||||
options.blockMinFeeRate = CFeeRate{ConsumeMoney(fuzzed_data_provider, /* max */ COIN)};
|
||||
options.blockMinFeeRate = CFeeRate{ConsumeMoney(fuzzed_data_provider, /*max=*/COIN)};
|
||||
auto assembler = BlockAssembler{chainstate, *static_cast<CTxMemPool*>(&tx_pool), ::Params(), options};
|
||||
auto block_template = assembler.CreateNewBlock(CScript{} << OP_TRUE);
|
||||
Assert(block_template->block.vtx.size() >= 1);
|
||||
|
|
@ -131,7 +131,7 @@ FUZZ_TARGET_INIT(tx_pool_standard, initialize_tx_pool)
|
|||
// The sum of the values of all spendable outpoints
|
||||
constexpr CAmount SUPPLY_TOTAL{COINBASE_MATURITY * 50 * COIN};
|
||||
|
||||
CTxMemPool tx_pool_{/* estimator */ nullptr, /* check_ratio */ 1};
|
||||
CTxMemPool tx_pool_{/*estimator=*/nullptr, /*check_ratio=*/1};
|
||||
MockedTxPool& tx_pool = *static_cast<MockedTxPool*>(&tx_pool_);
|
||||
|
||||
// Helper to query an amount
|
||||
|
|
@ -270,10 +270,10 @@ FUZZ_TARGET_INIT(tx_pool_standard, initialize_tx_pool)
|
|||
// Outpoints that no longer count toward the total supply
|
||||
std::set<COutPoint> consumed_supply;
|
||||
for (const auto& removed_tx : removed) {
|
||||
insert_tx(/* created_by_tx */ {consumed_erased}, /* consumed_by_tx */ {outpoints_supply}, /* tx */ *removed_tx);
|
||||
insert_tx(/*created_by_tx=*/{consumed_erased}, /*consumed_by_tx=*/{outpoints_supply}, /*tx=*/*removed_tx);
|
||||
}
|
||||
for (const auto& added_tx : added) {
|
||||
insert_tx(/* created_by_tx */ {outpoints_supply, outpoints_rbf}, /* consumed_by_tx */ {consumed_supply}, /* tx */ *added_tx);
|
||||
insert_tx(/*created_by_tx=*/{outpoints_supply, outpoints_rbf}, /*consumed_by_tx=*/{consumed_supply}, /*tx=*/*added_tx);
|
||||
}
|
||||
for (const auto& p : consumed_erased) {
|
||||
Assert(outpoints_supply.erase(p) == 1);
|
||||
|
|
@ -306,7 +306,7 @@ FUZZ_TARGET_INIT(tx_pool, initialize_tx_pool)
|
|||
txids.push_back(ConsumeUInt256(fuzzed_data_provider));
|
||||
}
|
||||
|
||||
CTxMemPool tx_pool_{/* estimator */ nullptr, /* check_ratio */ 1};
|
||||
CTxMemPool tx_pool_{/*estimator=*/nullptr, /*check_ratio=*/1};
|
||||
MockedTxPool& tx_pool = *static_cast<MockedTxPool*>(&tx_pool_);
|
||||
|
||||
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 300)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue