Changeset View
Changeset View
Standalone View
Standalone View
src/util.h
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | enum LogFlags : uint32_t { | ||||
RAND = (1 << 13), | RAND = (1 << 13), | ||||
PRUNE = (1 << 14), | PRUNE = (1 << 14), | ||||
PROXY = (1 << 15), | PROXY = (1 << 15), | ||||
MEMPOOLREJ = (1 << 16), | MEMPOOLREJ = (1 << 16), | ||||
LIBEVENT = (1 << 17), | LIBEVENT = (1 << 17), | ||||
COINDB = (1 << 18), | COINDB = (1 << 18), | ||||
QT = (1 << 19), | QT = (1 << 19), | ||||
LEVELDB = (1 << 20), | LEVELDB = (1 << 20), | ||||
HEADERTIMESTAMPS = (1 << 21), | |||||
deadalnix: I think it's a good idea to log always this. A block arrive every 10 mins, so it's not like it… | |||||
jasonbcoxAuthorUnsubmitted Not Done Inline ActionsI guess that makes sense. It allows people to debug their relationship with the network in terms of lag time from block creation to arriving at their machine (assuming honest blocks). jasonbcox: I guess that makes sense. It allows people to debug their relationship with the network in… | |||||
ALL = ~uint32_t(0), | ALL = ~uint32_t(0), | ||||
}; | }; | ||||
} | } | ||||
/** Return true if log accepts specified category */ | /** Return true if log accepts specified category */ | ||||
static inline bool LogAcceptCategory(uint32_t category) { | static inline bool LogAcceptCategory(uint32_t category) { | ||||
return (logCategories.load(std::memory_order_relaxed) & category) != 0; | return (logCategories.load(std::memory_order_relaxed) & category) != 0; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines |
I think it's a good idea to log always this. A block arrive every 10 mins, so it's not like it is going to be a flood.