diff --git a/src/test/fuzz/process_message.cpp b/src/test/fuzz/process_message.cpp --- a/src/test/fuzz/process_message.cpp +++ b/src/test/fuzz/process_message.cpp @@ -21,16 +21,13 @@ #include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include @@ -44,31 +41,6 @@ const std::string LIMIT_TO_MESSAGE_TYPE; #endif -const std::map> - EXPECTED_DESERIALIZATION_EXCEPTIONS = { - {"CDataStream::read(): end of data: iostream error", - {"addr", "block", "blocktxn", "cmpctblock", "feefilter", "filteradd", - "filterload", "getblocks", "getblocktxn", "getdata", "getheaders", - "headers", "inv", "notfound", "ping", "sendcmpct", "tx"}}, - {"CompactSize exceeds limit of type: iostream error", {"cmpctblock"}}, - {"differential value overflow: iostream error", {"getblocktxn"}}, - {"index overflowed 16 bits: iostream error", {"getblocktxn"}}, - {"index overflowed 16-bits: iostream error", {"cmpctblock"}}, - {"indexes overflowed 16 bits: iostream error", {"getblocktxn"}}, - {"non-canonical ReadCompactSize(): iostream error", - {"addr", "block", "blocktxn", "cmpctblock", "filteradd", "filterload", - "getblocks", "getblocktxn", "getdata", "getheaders", "headers", "inv", - "notfound", "tx"}}, - {"ReadCompactSize(): size too large: iostream error", - {"addr", "block", "blocktxn", "cmpctblock", "filteradd", "filterload", - "getblocks", "getblocktxn", "getdata", "getheaders", "headers", "inv", - "notfound", "tx"}}, - {"Superfluous witness record: iostream error", - {"block", "blocktxn", "cmpctblock", "tx"}}, - {"Unknown transaction optional data: iostream error", - {"block", "blocktxn", "cmpctblock", "tx"}}, -}; - const TestingSetup *g_setup; } // namespace @@ -116,17 +88,7 @@ g_setup->m_node.peer_logic->ProcessMessage( config, p2p_node, random_message_type, random_bytes_data_stream, GetTimeMillis(), std::atomic{false}); - } catch (const std::ios_base::failure &e) { - const std::string exception_message{e.what()}; - const auto p = - EXPECTED_DESERIALIZATION_EXCEPTIONS.find(exception_message); - if (p == EXPECTED_DESERIALIZATION_EXCEPTIONS.cend() || - p->second.count(random_message_type) == 0) { - std::cout << "Unexpected exception when processing message type \"" - << random_message_type << "\": " << exception_message - << std::endl; - assert(false); - } + } catch (const std::ios_base::failure &) { } SyncWithValidationInterfaceQueue(); // See init.cpp for rationale for implicit locking order requirement