Use RpcSend on RPC::self_limiter::ready_requests (#6634)

We don't need to store `BehaviourAction` for `ready_requests` and therefore avoid having an `unreachable!` on #6625.
Therefore this PR should be merged before it
This commit is contained in:
João Oliveira
2025-02-19 21:17:19 +00:00
committed by GitHub
parent 6ab6eae40c
commit 193061ff73
2 changed files with 18 additions and 22 deletions

View File

@@ -232,14 +232,14 @@ impl<Id: ReqId, E: EthSpec> RPC<Id, E> {
}
}
} else {
ToSwarm::NotifyHandler {
peer_id,
handler: NotifyHandler::Any,
event: RPCSend::Request(request_id, req),
}
RPCSend::Request(request_id, req)
};
self.events.push(event);
self.events.push(BehaviourAction::NotifyHandler {
peer_id,
handler: NotifyHandler::Any,
event,
});
}
/// Lighthouse wishes to disconnect from this peer by sending a Goodbye message. This