macro_rules! block {
($blocker:expr, $peer:expr, $($arg:tt)+) => { ... };
}Expand description
Logs a warning and blocks a peer in a single call.
This macro combines a tracing::warn! with a Blocker::block call
to ensure consistent logging at every block site. The peer is always
included as a peer field in the log output.
§Examples
ⓘ
block!(self.blocker, sender, "invalid message");
block!(self.blocker, sender, ?err, "invalid ack signature");
block!(self.blocker, sender, %view, "blocking peer for epoch mismatch");