mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 05:44:44 +00:00
Errors for all RPC Requests (#5867)
* Return and error if peer has disconnected * Report errors for rate limited requests * Code improvement * Bump rust version to 1.78 * Downgrade to 1.77 * Update beacon_node/lighthouse_network/src/service/mod.rs Co-authored-by: João Oliveira <hello@jxs.pt> * fix fmt * Merge branch 'unstable' of https://github.com/sigp/lighthouse into rpc-peer-disconnect-error * update lockfile
This commit is contained in:
@@ -613,7 +613,15 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
request,
|
||||
request_id,
|
||||
} => {
|
||||
self.libp2p.send_request(peer_id, request_id, request);
|
||||
if let Err((request_id, error)) =
|
||||
self.libp2p.send_request(peer_id, request_id, request)
|
||||
{
|
||||
self.send_to_router(RouterMessage::RPCFailed {
|
||||
peer_id,
|
||||
request_id,
|
||||
error,
|
||||
});
|
||||
}
|
||||
}
|
||||
NetworkMessage::SendResponse {
|
||||
peer_id,
|
||||
|
||||
Reference in New Issue
Block a user