Skip to content

Commit

Permalink
Merge pull request #1182 from jgriffiths/fix_blind_reissuance_amount_…
Browse files Browse the repository at this point in the history
…proof_output

rpc: decodepsbt: fix check for blind_reissuance_amount_proof output
  • Loading branch information
psgreco committed Oct 18, 2022
2 parents fde2277 + e2348da commit 816585d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/blindpsbt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ static bool CreateBlindAssetProof(std::vector<unsigned char>& assetproof, const

bool VerifyBlindValueProof(CAmount value, const CConfidentialValue& conf_value, const std::vector<unsigned char>& proof, const CConfidentialAsset& conf_asset)
{
if (conf_value.IsNull() || conf_asset.IsNull()) {
return false;
}

secp256k1_pedersen_commitment value_commit;
if (secp256k1_pedersen_commitment_parse(secp256k1_blind_context, &value_commit, conf_value.vchCommitment.data()) == 0) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ static RPCHelpMan decodepsbt()
}

// Issuance blind inflation keys value proof
if (!input.m_blind_issuance_value_proof.empty()) {
if (!input.m_blind_issuance_inflation_keys_proof.empty()) {
in.pushKV("blind_reissuance_amount_proof", HexStr(input.m_blind_issuance_inflation_keys_proof));
}

Expand Down

0 comments on commit 816585d

Please sign in to comment.