| 418 | } |
| 419 | |
| 420 | CTxDestination ConsumeTxDestination(FuzzedDataProvider& fuzzed_data_provider) noexcept |
| 421 | { |
| 422 | CTxDestination tx_destination; |
| 423 | const size_t call_size{CallOneOf( |
| 424 | fuzzed_data_provider, |
| 425 | [&] { |
| 426 | tx_destination = CNoDestination{}; |
| 427 | }, |
| 428 | [&] { |
| 429 | tx_destination = PKHash{ConsumeUInt160(fuzzed_data_provider)}; |
| 430 | }, |
| 431 | [&] { |
| 432 | tx_destination = ScriptHash{ConsumeUInt160(fuzzed_data_provider)}; |
| 433 | }, |
| 434 | [&] { |
| 435 | tx_destination = WitnessV0ScriptHash{ConsumeUInt256(fuzzed_data_provider)}; |
| 436 | }, |
| 437 | [&] { |
| 438 | tx_destination = WitnessV0KeyHash{ConsumeUInt160(fuzzed_data_provider)}; |
| 439 | }, |
| 440 | [&] { |
| 441 | tx_destination = WitnessV1Taproot{XOnlyPubKey{ConsumeUInt256(fuzzed_data_provider)}}; |
| 442 | }, |
| 443 | [&] { |
| 444 | WitnessUnknown witness_unknown{}; |
| 445 | witness_unknown.version = fuzzed_data_provider.ConsumeIntegralInRange(2, 16); |
| 446 | std::vector<uint8_t> witness_unknown_program_1{fuzzed_data_provider.ConsumeBytes<uint8_t>(40)}; |
| 447 | if (witness_unknown_program_1.size() < 2) { |
| 448 | witness_unknown_program_1 = {0, 0}; |
| 449 | } |
| 450 | witness_unknown.length = witness_unknown_program_1.size(); |
| 451 | std::copy(witness_unknown_program_1.begin(), witness_unknown_program_1.end(), witness_unknown.program); |
| 452 | tx_destination = witness_unknown; |
| 453 | }, |
| 454 | [&] { |
| 455 | tx_destination = NullData{}; |
| 456 | })}; |
| 457 | Assert(call_size == std::variant_size_v<CTxDestination>); |
| 458 | return tx_destination; |
| 459 | } |
| 460 | |
| 461 | CTxMemPoolEntry ConsumeTxMemPoolEntry(FuzzedDataProvider& fuzzed_data_provider, const CTransaction& tx) noexcept |
| 462 | { |
no test coverage detected