protocols/kad: Refactor KademliaEvent (#2321)

Rename `KademliaEvent::InboundRequestServed` to `KademliaEvent::InboundRequest` and move
`InboundPutRecordRequest` into `InboundRequest::PutRecord` and `InboundAddProviderRequest` into
`InboundRequest::AddProvider`.

Co-authored-by: supercmmetry <vishaals2000@gmail.com>
This commit is contained in:
Max Inden
2021-10-30 15:50:45 +02:00
committed by GitHub
parent ff5d455ccf
commit 06c339c141
8 changed files with 89 additions and 64 deletions

View File

@ -258,7 +258,7 @@ impl super::Recorder<libp2p_kad::KademliaEvent> for super::Metrics {
}
}
libp2p_kad::KademliaEvent::InboundRequestServed { request } => {
libp2p_kad::KademliaEvent::InboundRequest { request } => {
self.kad
.inbound_requests
.get_or_create(&request.into())