Skip to content

Commit

Permalink
Add comment on witness-null issuance transactions' invalidity
Browse files Browse the repository at this point in the history
  • Loading branch information
instagibbs committed Nov 27, 2018
1 parent 5fe9c2c commit 1599356
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,9 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
return false;
}
if (!issuance.nAmount.IsNull()) {
// Note: This check disallows issuances in transactions with *no* witness data.
// This can be relaxed in a future update as a HF by passing in an empty rangeproof
// to `VerifyIssuanceAmount` instead.
if (i >= tx.wit.vtxinwit.size()) {
return false;
}
Expand Down Expand Up @@ -889,6 +892,9 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
return false;
}

// Note: This check disallows issuances in transactions with *no* witness data.
// This can be relaxed in a future update as a HF by passing in an empty rangeproof
// to `VerifyIssuanceAmount` instead.
if (i >= tx.wit.vtxinwit.size()) {
return false;
}
Expand Down

0 comments on commit 1599356

Please sign in to comment.