Add comment on witness-null issuance transactions' invalidity

This commit is contained in:
Gregory Sanders 2018-11-27 09:06:05 -05:00
parent 5fe9c2cbeb
commit 1599356bb2

View file

@ -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;
}
@ -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;
}