From 91e38ec706d0baf3641efd9007f8a66d29bea58f Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 25 Oct 2014 17:13:40 +0200 Subject: [PATCH] Remove stupid assertion. Add licence header to solc. --- libdevcrypto/EC.cpp | 2 +- libqethereum/QEthereum.cpp | 2 ++ libqethereum/QEthereum.h | 2 +- solc/main.cpp | 21 +++++++++++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/libdevcrypto/EC.cpp b/libdevcrypto/EC.cpp index b38703ac3..75c2fcc3d 100644 --- a/libdevcrypto/EC.cpp +++ b/libdevcrypto/EC.cpp @@ -66,7 +66,7 @@ void dev::crypto::decrypt(Secret const& _k, bytes& io_text) p.resize(d.MaxPlaintextLength(io_text.size())); // todo: use StringSource with _c as input and output. DecodingResult r = d.Decrypt(pp::PRNG(), io_text.data(), clen, p.data()); - assert(r.messageLength); +// assert(r.messageLength); io_text.resize(r.messageLength); io_text = std::move(p); } diff --git a/libqethereum/QEthereum.cpp b/libqethereum/QEthereum.cpp index e77c9d632..92180817b 100644 --- a/libqethereum/QEthereum.cpp +++ b/libqethereum/QEthereum.cpp @@ -725,6 +725,8 @@ void QWhisper::poll() { cwarn << "Silently decrypting message from identity" << w.second.abridged() << ": User validation hook goes here."; m = e.open(m_ids[w.second]); + if (!m) + continue; } else m = e.open(); diff --git a/libqethereum/QEthereum.h b/libqethereum/QEthereum.h index f17b967a4..37f0800cc 100644 --- a/libqethereum/QEthereum.h +++ b/libqethereum/QEthereum.h @@ -233,7 +233,7 @@ public: // Watches interface Q_INVOKABLE unsigned newWatch(QString _json); Q_INVOKABLE void killWatch(unsigned _w); - void clearWatches(); + Q_INVOKABLE void clearWatches(); Q_INVOKABLE QString watchMessages(unsigned _w); public slots: diff --git a/solc/main.cpp b/solc/main.cpp index ba0b6ccf7..1acdefd8c 100644 --- a/solc/main.cpp +++ b/solc/main.cpp @@ -1,3 +1,24 @@ +/* + This file is part of cpp-ethereum. + + cpp-ethereum is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + cpp-ethereum is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with cpp-ethereum. If not, see . +*/ +/** + * @author Christian + * @date 2014 + * Solidity abstract syntax tree. + */ #include #include