mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 20:31:13 +00:00
Decrease the peer reputation on invalid block requests (#8260)
* Decrease the peer reputation on invalid block requests This pr changes the block request handler to decrease the reputation of peers when they send the same request multiple times or they send us an invalid block request. * Review feedback * Change log target * Remove unused code
This commit is contained in:
@@ -727,7 +727,11 @@ pub trait TestNetFactory: Sized {
|
||||
let protocol_id = ProtocolId::from("test-protocol-name");
|
||||
|
||||
let block_request_protocol_config = {
|
||||
let (handler, protocol_config) = BlockRequestHandler::new(&protocol_id, client.clone());
|
||||
let (handler, protocol_config) = BlockRequestHandler::new(
|
||||
&protocol_id,
|
||||
client.clone(),
|
||||
50,
|
||||
);
|
||||
self.spawn_task(handler.run().boxed());
|
||||
protocol_config
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user