MCPcopy Create free account
hub / github.com/ElementsProject/elements / Consume

Method Consume

src/logging.cpp:500–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498}
499
500bool BCLog::LogRateLimiter::Consume(uint64_t bytes)
501{
502 MaybeReset();
503
504 if (bytes > m_available_bytes) {
505 m_dropped_bytes += bytes;
506 m_available_bytes = 0;
507 return false;
508 }
509
510 m_available_bytes -= bytes;
511 return true;
512}

Callers 2

LogPrintStrMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64