From 1599356bb2dc3ac1f5f0ccfcdeb68688be1b6a13 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Tue, 27 Nov 2018 09:06:05 -0500 Subject: [PATCH] Add comment on witness-null issuance transactions' invalidity --- src/validation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/validation.cpp b/src/validation.cpp index 60eaad461c..fd903c66e4 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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; }