Skip to content

Commit 1599356

Browse files
committed
Add comment on witness-null issuance transactions' invalidity
1 parent 5fe9c2c commit 1599356

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/validation.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,9 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
862862
return false;
863863
}
864864
if (!issuance.nAmount.IsNull()) {
865+
// Note: This check disallows issuances in transactions with *no* witness data.
866+
// This can be relaxed in a future update as a HF by passing in an empty rangeproof
867+
// to `VerifyIssuanceAmount` instead.
865868
if (i >= tx.wit.vtxinwit.size()) {
866869
return false;
867870
}
@@ -889,6 +892,9 @@ bool VerifyAmounts(const CCoinsViewCache& cache, const CTransaction& tx, std::ve
889892
return false;
890893
}
891894

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

0 commit comments

Comments
 (0)