Changeset View
Changeset View
Standalone View
Standalone View
src/test/fuzz/psbt.cpp
Show All 30 Lines | void test_one_input(const std::vector<uint8_t> &buffer) { | ||||
const PSBTAnalysis analysis = AnalyzePSBT(psbt); | const PSBTAnalysis analysis = AnalyzePSBT(psbt); | ||||
(void)PSBTRoleName(analysis.next); | (void)PSBTRoleName(analysis.next); | ||||
for (const PSBTInputAnalysis &input_analysis : analysis.inputs) { | for (const PSBTInputAnalysis &input_analysis : analysis.inputs) { | ||||
(void)PSBTRoleName(input_analysis.next); | (void)PSBTRoleName(input_analysis.next); | ||||
} | } | ||||
(void)psbt.IsNull(); | (void)psbt.IsNull(); | ||||
(void)psbt.IsSane(); | |||||
std::optional<CMutableTransaction> tx = psbt.tx; | std::optional<CMutableTransaction> tx = psbt.tx; | ||||
if (tx) { | if (tx) { | ||||
const CMutableTransaction &mtx = *tx; | const CMutableTransaction &mtx = *tx; | ||||
const PartiallySignedTransaction psbt_from_tx{mtx}; | const PartiallySignedTransaction psbt_from_tx{mtx}; | ||||
} | } | ||||
for (const PSBTInput &input : psbt.inputs) { | for (const PSBTInput &input : psbt.inputs) { | ||||
(void)PSBTInputSigned(input); | (void)PSBTInputSigned(input); | ||||
(void)input.IsNull(); | (void)input.IsNull(); | ||||
(void)input.IsSane(); | |||||
} | } | ||||
for (const PSBTOutput &output : psbt.outputs) { | for (const PSBTOutput &output : psbt.outputs) { | ||||
(void)output.IsNull(); | (void)output.IsNull(); | ||||
} | } | ||||
for (size_t i = 0; i < psbt.tx->vin.size(); ++i) { | for (size_t i = 0; i < psbt.tx->vin.size(); ++i) { | ||||
CTxOut tx_out; | CTxOut tx_out; | ||||
Show All 18 Lines |