| 459 | } |
| 460 | |
| 461 | CTxMemPoolEntry ConsumeTxMemPoolEntry(FuzzedDataProvider& fuzzed_data_provider, const CTransaction& tx) noexcept |
| 462 | { |
| 463 | // Avoid: |
| 464 | // policy/feerate.cpp:28:34: runtime error: signed integer overflow: 34873208148477500 * 1000 cannot be represented in type 'long' |
| 465 | // |
| 466 | // Reproduce using CFeeRate(348732081484775, 10).GetFeePerK() |
| 467 | const CAmount fee = std::min<CAmount>(ConsumeMoney(fuzzed_data_provider), std::numeric_limits<CAmount>::max() / static_cast<CAmount>(100000)); |
| 468 | assert(MoneyRange(fee)); |
| 469 | const int64_t time = fuzzed_data_provider.ConsumeIntegral<int64_t>(); |
| 470 | const unsigned int entry_height = fuzzed_data_provider.ConsumeIntegral<unsigned int>(); |
| 471 | const bool spends_coinbase = fuzzed_data_provider.ConsumeBool(); |
| 472 | const unsigned int sig_op_cost = fuzzed_data_provider.ConsumeIntegralInRange<unsigned int>(0, MAX_BLOCK_SIGOPS_COST); |
| 473 | std::set<std::pair<uint256, COutPoint>> setPeginsSpent; |
| 474 | return CTxMemPoolEntry{MakeTransactionRef(tx), fee, time, entry_height, spends_coinbase, sig_op_cost, {}, setPeginsSpent}; |
| 475 | } |
| 476 | |
| 477 | bool ContainsSpentInput(const CTransaction& tx, const CCoinsViewCache& inputs) noexcept |
| 478 | { |
no test coverage detected