mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-25 13:07:18 +00:00
Relax requirement for enr fork digest predicate (#2433)
This commit is contained in:
parent
c1d2e35c9e
commit
64226321b3
@ -737,7 +737,11 @@ impl<TSpec: EthSpec> Discovery<TSpec> {
|
|||||||
};
|
};
|
||||||
// predicate for finding nodes with a matching fork and valid tcp port
|
// predicate for finding nodes with a matching fork and valid tcp port
|
||||||
let eth2_fork_predicate = move |enr: &Enr| {
|
let eth2_fork_predicate = move |enr: &Enr| {
|
||||||
enr.eth2() == Ok(enr_fork_id.clone()) && (enr.tcp().is_some() || enr.tcp6().is_some())
|
// `next_fork_epoch` and `next_fork_version` can be different so that
|
||||||
|
// we can connect to peers who aren't compatible with an upcoming fork.
|
||||||
|
// `fork_digest` **must** be same.
|
||||||
|
enr.eth2().map(|e| e.fork_digest) == Ok(enr_fork_id.fork_digest)
|
||||||
|
&& (enr.tcp().is_some() || enr.tcp6().is_some())
|
||||||
};
|
};
|
||||||
|
|
||||||
// General predicate
|
// General predicate
|
||||||
|
Loading…
Reference in New Issue
Block a user