From 558d05b47e6f6c2ff8362cc508dc68428ade889c Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 17 May 2018 10:38:00 +0100 Subject: [PATCH 1/2] epee: log type name when a container size check fails --- .../include/serialization/keyvalue_serialization_overloads.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/epee/include/serialization/keyvalue_serialization_overloads.h b/contrib/epee/include/serialization/keyvalue_serialization_overloads.h index 7087136cc..09087f785 100644 --- a/contrib/epee/include/serialization/keyvalue_serialization_overloads.h +++ b/contrib/epee/include/serialization/keyvalue_serialization_overloads.h @@ -156,7 +156,7 @@ namespace epee typename stl_container::value_type* pelem = (typename stl_container::value_type*)buff.data(); CHECK_AND_ASSERT_MES(!(loaded_size%sizeof(typename stl_container::value_type)), false, - "size in blob " << loaded_size << " not have not zero modulo for sizeof(value_type) = " << sizeof(typename stl_container::value_type)); + "size in blob " << loaded_size << " not have not zero modulo for sizeof(value_type) = " << sizeof(typename stl_container::value_type) << ", type " << typeid(typename stl_container::value_type).name()); size_t count = (loaded_size/sizeof(typename stl_container::value_type)); for(size_t i = 0; i < count; i++) container.insert(container.end(), *(pelem++)); From a2566db09e45311f7af60a962c3bfd4cd4fef537 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 17 May 2018 10:38:26 +0100 Subject: [PATCH 2/2] object_sizes: add a few useful types --- src/debug_utilities/object_sizes.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/debug_utilities/object_sizes.cpp b/src/debug_utilities/object_sizes.cpp index a3d037a59..ab8839636 100644 --- a/src/debug_utilities/object_sizes.cpp +++ b/src/debug_utilities/object_sizes.cpp @@ -94,6 +94,11 @@ int main(int argc, char* argv[]) SL(nodetool::node_server>); SL(nodetool::p2p_connection_context_t::connection_context>); SL(nodetool::network_address_old); + SL(nodetool::peerlist_entry_base); + + SL(nodetool::network_config); + SL(nodetool::basic_node_data); + SL(cryptonote::CORE_SYNC_DATA); SL(tools::wallet2::transfer_details); SL(tools::wallet2::payment_details);