mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 13:48:00 +00:00
Sync: Fix issue of not freeing a block announcement slot (#8006)
* Sync: Fix issue of not freeing a block announcement slot
There was a bug that when the block announcement validation returned an
error, the slot reserved for this validation wasn't freed. This could
lead to a situation where we rejected any block announcement from such a
peer for that the block announcement returned an error multiple times.
* Better logging
* Fuck I'm dumb
* 🤦
This commit is contained in:
@@ -59,6 +59,10 @@ pub trait BlockAnnounceValidator<B: Block> {
|
||||
///
|
||||
/// Returning [`Validation::Failure`] will lead to a decrease of the
|
||||
/// peers reputation as it sent us invalid data.
|
||||
///
|
||||
/// The returned future should only resolve to an error iff there was an internal error validating
|
||||
/// the block announcement. If the block announcement itself is invalid, this should *always*
|
||||
/// return [`Validation::Failure`].
|
||||
fn validate(
|
||||
&mut self,
|
||||
header: &B::Header,
|
||||
|
||||
Reference in New Issue
Block a user