From 54f7429cf62ba9c8e32cf6b2a841215b1eb5b7a0 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 14 Jun 2016 17:15:49 +0100 Subject: ringct: allow no outputs, and add tests for this and fees --- src/ringct/rctSigs.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/ringct/rctSigs.cpp b/src/ringct/rctSigs.cpp index a07dbaab3..7b83ca0e2 100644 --- a/src/ringct/rctSigs.cpp +++ b/src/ringct/rctSigs.cpp @@ -471,7 +471,6 @@ namespace rct { // Note: For txn fees, the last index in the amounts vector should contain that // Thus the amounts vector will be "one" longer than the destinations vectort rctSig genRct(const ctkeyV & inSk, const keyV & destinations, const vector amounts, const ctkeyM &mixRing, unsigned int index) { - CHECK_AND_ASSERT_THROW_MES(amounts.size() > 0, "Amounts must not be empty"); CHECK_AND_ASSERT_THROW_MES(amounts.size() == destinations.size() || amounts.size() == destinations.size() + 1, "Different number of amounts/destinations"); CHECK_AND_ASSERT_THROW_MES(index < mixRing.size(), "Bad index into mixRing"); for (size_t n = 0; n < mixRing.size(); ++n) { @@ -536,7 +535,6 @@ namespace rct { // uses the attached ecdh info to find the amounts represented by each output commitment // must know the destination private key to find the correct amount, else will return a random number bool verRct(const rctSig & rv) { - CHECK_AND_ASSERT_THROW_MES(rv.rangeSigs.size() > 0, "Empty rv.rangeSigs"); CHECK_AND_ASSERT_THROW_MES(rv.outPk.size() == rv.rangeSigs.size(), "Mismatched sizes of rv.outPk and rv.rangeSigs"); size_t i = 0; -- cgit v1.2.3