Skip to content

Commit 3be6e80

Browse files
committed
PSET: handle missing/NULL issuance assets when blinding
1 parent e319fe0 commit 3be6e80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/blindpsbt.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,13 @@ BlindingStatus BlindPSBT(PartiallySignedTransaction& psbt, std::map<uint32_t, st
361361
if (secp256k1_generator_generate(secp256k1_blind_context, &ephemeral_input_tags.back(), asset.GetAsset().begin()) != 1) {
362362
return BlindingStatus::INVALID_ASSET;
363363
}
364-
} else {
364+
} else if (asset.IsCommitment()) {
365365
// Parse the asset commitment as a generator (because it is)
366366
if (secp256k1_generator_parse(secp256k1_blind_context, &ephemeral_input_tags.back(), asset.vchCommitment.data()) != 1) {
367367
return BlindingStatus::INVALID_ASSET_COMMITMENT;
368368
}
369+
} else {
370+
return BlindingStatus::INVALID_ASSET; // Missing asset
369371
}
370372

371373
fixed_input_tags.emplace_back();

0 commit comments

Comments
 (0)