mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Simulator and attestation service fixes (#1747)
## Issue Addressed #1729 #1730 Which issue # does this PR address? ## Proposed Changes 1. Fixes a bug in the simulator where nodes can't find each other due to 0 udp ports in their enr. 2. Fixes bugs in attestation service where we are unsubscribing from a subnet prematurely. More testing is needed for attestation service fixes.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
///! The subnet predicate used for searching for a particular subnet.
|
||||
use super::*;
|
||||
use slog::{debug, trace};
|
||||
use slog::trace;
|
||||
use std::ops::Deref;
|
||||
|
||||
/// Returns the predicate for a given subnet.
|
||||
@@ -38,7 +38,7 @@ where
|
||||
);
|
||||
return false;
|
||||
} else {
|
||||
debug!(
|
||||
trace!(
|
||||
log_clone,
|
||||
"Peer found on desired subnet(s)";
|
||||
"peer_id" => format!("{}", enr.peer_id()),
|
||||
|
||||
@@ -250,7 +250,9 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
|
||||
.collect();
|
||||
|
||||
// request the subnet query from discovery
|
||||
self.discovery.discover_subnet_peers(filtered);
|
||||
if !filtered.is_empty() {
|
||||
self.discovery.discover_subnet_peers(filtered);
|
||||
}
|
||||
}
|
||||
|
||||
/// A STATUS message has been received from a peer. This resets the status timer.
|
||||
|
||||
Reference in New Issue
Block a user