mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-05 18:31:07 +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:
1 parent
0dc9750026
commit
85f32e8813
5 files changed
+130
-26
No files matched your search
@@ -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