std::size_t fetchRate() { std::lock_guard< std::mutex> lock(fetchRateMutex_); return 60 * fetchRate_.value( m_clock.now()); }
void onLedgerFetched ( InboundLedger::fcReason why) { if (why != InboundLedger::fcHISTORY) return; std::lock_guard< std::mutex> lock(fetchRateMutex_); fetchRate_.add(1, m_clock.now()); }
// Should only be called with an inboundledger that has // a reason of history or shard void onLedgerFetched() override { std::lock_guard<std::mutex> lock(fetchRateMutex_); fetchRate_.add(1, m_clock.now()); }