mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-03 13:53:12 +00:00
17 lines
376 B
Rust
17 lines
376 B
Rust
use std::collections::HashMap;
|
|
|
|
use crate::network_protocol::MessageKind;
|
|
|
|
#[derive(Debug)]
|
|
/// Object responsible to manage the rate limits of all network messages
|
|
/// for a single connection/peer.
|
|
pub struct RateLimiter {
|
|
pub limits: HashMap<MessageKind, u64>,
|
|
}
|
|
|
|
impl RateLimiter {
|
|
pub fn is_allowed(&self, _message: MessageKind) -> bool {
|
|
todo!();
|
|
}
|
|
}
|