mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 16:27:39 +00:00
Merge pull request #846
de030d9
fix: error: -Werror=misleading-indentation (moneroexample)c2d7300
contrib: epee: add exception spec to throwing destructors (redfish)6898741
src: p2p: add exception spec to throwing destructors (redfish)21dbc95
crypto: slow-hash: fix misleading indent (redfish)70f3634
crypto: slow-hash: remove unused hash list for ARM (redfish)1a7772f
crypto: oaes_lib: remove unused _NR array (redfish)6462a3a
crypto: fix compile error: use named type in sizeof (redfish)
This commit is contained in:
commit
ba61f37f9c
11 changed files with 16 additions and 21 deletions
|
@ -88,7 +88,7 @@ PRAGMA_WARNING_DISABLE_VS(4355)
|
|||
PRAGMA_WARNING_DISABLE_VS(4355)
|
||||
//---------------------------------------------------------------------------------
|
||||
template<class t_protocol_handler>
|
||||
connection<t_protocol_handler>::~connection()
|
||||
connection<t_protocol_handler>::~connection() noexcept(false)
|
||||
{
|
||||
if(!m_was_shutdown)
|
||||
{
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace net_utils
|
|||
virtual bool add_ref()=0;
|
||||
virtual bool release()=0;
|
||||
protected:
|
||||
virtual ~i_service_endpoint(){}
|
||||
virtual ~i_service_endpoint() noexcept(false) {}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace epee
|
|||
++m_counter_ref;
|
||||
CHECK_AND_ASSERT_THROW_MES(m_counter_ref < EPEE_PORTABLE_STORAGE_RECURSION_LIMIT_INTERNAL, "Wrong blob data in portable storage: recursion limitation (" << EPEE_PORTABLE_STORAGE_RECURSION_LIMIT_INTERNAL << ") exceeded");
|
||||
}
|
||||
~recursuion_limitation_guard()
|
||||
~recursuion_limitation_guard() noexcept(false)
|
||||
{
|
||||
CHECK_AND_ASSERT_THROW_MES(m_counter_ref != 0, "Internal error: m_counter_ref == 0 while ~recursuion_limitation_guard()");
|
||||
--m_counter_ref;
|
||||
|
|
|
@ -263,16 +263,17 @@ namespace crypto {
|
|||
|
||||
PUSH_WARNINGS
|
||||
DISABLE_VS_WARNINGS(4200)
|
||||
struct ec_point_pair {
|
||||
ec_point a, b;
|
||||
};
|
||||
struct rs_comm {
|
||||
hash h;
|
||||
struct {
|
||||
ec_point a, b;
|
||||
} ab[];
|
||||
struct ec_point_pair ab[];
|
||||
};
|
||||
POP_WARNINGS
|
||||
|
||||
static inline size_t rs_comm_size(size_t pubs_count) {
|
||||
return sizeof(rs_comm) + pubs_count * sizeof(rs_comm().ab[0]);
|
||||
return sizeof(rs_comm) + pubs_count * sizeof(ec_point_pair);
|
||||
}
|
||||
|
||||
void crypto_ops::generate_ring_signature(const hash &prefix_hash, const key_image &image,
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static const char _NR[] = {
|
||||
0x4e,0x61,0x62,0x69,0x6c,0x20,0x53,0x2e,0x20,
|
||||
0x41,0x6c,0x20,0x52,0x61,0x6d,0x6c,0x69,0x00 };
|
||||
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -658,10 +658,6 @@ void slow_hash_free_state(void)
|
|||
return;
|
||||
}
|
||||
|
||||
static void (*const extra_hashes[4])(const void *, size_t, char *) = {
|
||||
hash_extra_blake, hash_extra_groestl, hash_extra_jh, hash_extra_skein
|
||||
};
|
||||
|
||||
#define MEMORY (1 << 21) /* 2 MiB */
|
||||
#define ITER (1 << 20)
|
||||
#define AES_BLOCK_SIZE 16
|
||||
|
@ -827,7 +823,7 @@ void cn_slow_hash(const void *data, size_t length, char *hash)
|
|||
{
|
||||
for(j = 0; j < INIT_SIZE_BLK; j++)
|
||||
aesb_pseudo_round(&text[AES_BLOCK_SIZE * j], &text[AES_BLOCK_SIZE * j], expandedKey);
|
||||
memcpy(&long_state[i * INIT_SIZE_BYTE], text, INIT_SIZE_BYTE);
|
||||
memcpy(&long_state[i * INIT_SIZE_BYTE], text, INIT_SIZE_BYTE);
|
||||
}
|
||||
|
||||
U64(a)[0] = U64(&state.k[0])[0] ^ U64(&state.k[32])[0];
|
||||
|
|
|
@ -167,7 +167,7 @@ connection_basic::connection_basic(boost::asio::io_service& io_service, std::ato
|
|||
//boost::filesystem::create_directories("log/dr-monero/net/");
|
||||
}
|
||||
|
||||
connection_basic::~connection_basic() {
|
||||
connection_basic::~connection_basic() noexcept(false) {
|
||||
string remote_addr_str = "?";
|
||||
m_ref_sock_count--;
|
||||
try { boost::system::error_code e; remote_addr_str = socket_.remote_endpoint(e).address().to_string(); } catch(...){} ;
|
||||
|
|
|
@ -103,7 +103,7 @@ class connection_basic { // not-templated base class for rapid developmet of som
|
|||
// first counter is the ++/-- count of current sockets, the other socket_number is only-increasing ++ number generator
|
||||
connection_basic(boost::asio::io_service& io_service, std::atomic<long> &ref_sock_count, std::atomic<long> &sock_number);
|
||||
|
||||
virtual ~connection_basic();
|
||||
virtual ~connection_basic() noexcept(false);
|
||||
|
||||
// various handlers to be called from connection class:
|
||||
void do_send_handler_write(const void * ptr , size_t cb);
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace net_utils
|
|||
_info_c("dbg/data","Data logger constructed");
|
||||
}
|
||||
|
||||
data_logger::~data_logger() {
|
||||
data_logger::~data_logger() noexcept(false) {
|
||||
_note_c("dbg/data","Destructor of the data logger");
|
||||
{
|
||||
boost::lock_guard<boost::mutex> lock(mMutex);
|
||||
|
|
|
@ -55,7 +55,7 @@ enum class data_logger_state { state_before_init, state_during_init, state_ready
|
|||
public:
|
||||
static data_logger &get_instance(); ///< singleton
|
||||
static void kill_instance(); ///< call this before ending main to allow more gracefull shutdown of the main singleton and it's background thread
|
||||
~data_logger(); ///< destr, will be called when singleton is killed when global m_obj dies. will kill theads etc
|
||||
~data_logger() noexcept(false); ///< destr, will be called when singleton is killed when global m_obj dies. will kill theads etc
|
||||
|
||||
private:
|
||||
data_logger(); ///< constructor is private, use only via singleton get_instance
|
||||
|
|
|
@ -129,7 +129,9 @@ public:
|
|||
return starting_height[version];
|
||||
}
|
||||
virtual void set_hard_fork_version(uint64_t height, uint8_t version) {
|
||||
if (versions.size() <= height) versions.resize(height+1); versions[height] = version;
|
||||
if (versions.size() <= height)
|
||||
versions.resize(height+1);
|
||||
versions[height] = version;
|
||||
}
|
||||
virtual uint8_t get_hard_fork_version(uint64_t height) const {
|
||||
return versions[height];
|
||||
|
|
Loading…
Reference in a new issue