Catch exceptions from non-canonical encoding and print only to log

This commit is contained in:
mrbandrews
2016-06-02 14:43:18 -04:00
committed by lateminer
parent a5a7b5ce44
commit ee5df5c99f

View File

@@ -6342,6 +6342,11 @@ bool ProcessMessages(CNode* pfrom)
// Allow exceptions from over-long size
LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
}
else if (strstr(e.what(), "non-canonical ReadCompactSize()"))
{
// Allow exceptions from non-canonical encoding
LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
}
else
{
PrintExceptionContinue(&e, "ProcessMessages()");