From d4f07b40de62cb1bbdbb5ddfc342a75953d51852 Mon Sep 17 00:00:00 2001 From: stoffu Date: Tue, 4 Sep 2018 13:00:38 +0900 Subject: [PATCH] wallet2.get_reserve_proof: throw when specified amount is zero --- src/wallet/wallet2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index aa6c6eb1f..6b17803f8 100755 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -8915,6 +8915,7 @@ std::string wallet2::get_reserve_proof(const boost::optionalsecond == 0, error::wallet_internal_error, "Proved amount must be greater than 0"); // minimize the number of outputs included in the proof, by only picking the N largest outputs that can cover the requested min reserve amount std::sort(selected_transfers.begin(), selected_transfers.end(), [&](const size_t a, const size_t b) { return m_transfers[a].amount() > m_transfers[b].amount(); });