mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-17 18:40:09 +00:00
Merge #9112: Avoid ugly exception in log on unknown inv type
e9f25dd Avoid ugly exception in log on unknown inv type (Wladimir J. van der Laan)
This commit is contained in:
commit
46027e8668
@ -181,7 +181,11 @@ std::string CInv::GetCommand() const
|
|||||||
|
|
||||||
std::string CInv::ToString() const
|
std::string CInv::ToString() const
|
||||||
{
|
{
|
||||||
return strprintf("%s %s", GetCommand(), hash.ToString());
|
try {
|
||||||
|
return strprintf("%s %s", GetCommand(), hash.ToString());
|
||||||
|
} catch(const std::out_of_range &) {
|
||||||
|
return strprintf("0x%08x %s", type, hash.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<std::string> &getAllNetMessageTypes()
|
const std::vector<std::string> &getAllNetMessageTypes()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user