From cb0f89646f065800d38d7cfc10ba1e855563296a Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Thu, 28 Jan 2010 00:31:00 +0000 Subject: simplify AddAddress, readcompactsize limit, fixed a 64-bit compile error in serialize.h, change status "# blocks" to "# confirmations" and widen the column. git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@53 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 4cc91cb1b8..416c616ad1 100644 --- a/main.cpp +++ b/main.cpp @@ -1734,6 +1734,11 @@ bool ProcessMessages(CNode* pfrom) // Allow exceptions from underlength message on vRecv printf("ProcessMessage(%s, %d bytes) : Exception '%s' caught, normally caused by a message being shorter than its stated length\n", strCommand.c_str(), nMessageSize, e.what()); } + else if (strstr(e.what(), ": size too large")) + { + // Allow exceptions from overlong size + printf("ProcessMessage(%s, %d bytes) : Exception '%s' caught\n", strCommand.c_str(), nMessageSize, e.what()); + } else { PrintException(&e, "ProcessMessage()"); @@ -1840,7 +1845,6 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) return error("message addr size() = %d", vAddr.size()); // Store the new addresses - CAddrDB addrdb; foreach(CAddress& addr, vAddr) { if (fShutdown) @@ -1848,7 +1852,7 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) addr.nTime = GetAdjustedTime() - 2 * 60 * 60; if (pfrom->fGetAddr) addr.nTime -= 5 * 24 * 60 * 60; - AddAddress(addrdb, addr, false); + AddAddress(addr, false); pfrom->AddAddressKnown(addr); if (!pfrom->fGetAddr && addr.IsRoutable()) { -- cgit v1.2.3