Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions beacon_node/beacon_chain/src/attester_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,7 @@ impl AttesterCache {
value: AttesterCacheValue,
) {
while cache.len() >= MAX_CACHE_LEN {
if let Some(oldest) = cache
.iter()
.map(|(key, _)| *key)
.min_by_key(|key| key.epoch)
{
if let Some(oldest) = cache.keys().copied().min_by_key(|key| key.epoch) {
cache.remove(&oldest);
} else {
break;
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/validator_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ impl MonitoredValidator {

// Prune
while summaries.len() > HISTORIC_EPOCHS {
if let Some(key) = summaries.iter().map(|(epoch, _)| *epoch).min() {
if let Some(key) = summaries.keys().copied().min() {
summaries.remove(&key);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ impl<E: EthSpec> NetworkBehaviour for PeerManager<E> {
if let Some(enr) = self.peers_to_dial.pop() {
self.inject_peer_connection(&enr.peer_id(), ConnectingType::Dialing, Some(enr.clone()));

let multiaddr_quic = if self.quic_enabled {
enr.multiaddr_quic()
} else {
vec![]
};

// Prioritize Quic connections over Tcp ones.
let multiaddrs = [
self.quic_enabled
.then_some(enr.multiaddr_quic())
.unwrap_or_default(),
enr.multiaddr_tcp(),
]
.concat();
let multiaddrs = [multiaddr_quic, enr.multiaddr_tcp()].concat();

debug!(peer_id = %enr.peer_id(), ?multiaddrs, "Dialing peer");
return Poll::Ready(ToSwarm::Dial {
Expand Down
8 changes: 4 additions & 4 deletions beacon_node/operation_pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@ impl<E: EthSpec> OperationPool<E> {
pub fn get_all_proposer_slashings(&self) -> Vec<ProposerSlashing> {
self.proposer_slashings
.read()
.iter()
.map(|(_, slashing)| slashing.as_inner().clone())
.values()
.map(|slashing| slashing.as_inner().clone())
.collect()
}

Expand All @@ -711,8 +711,8 @@ impl<E: EthSpec> OperationPool<E> {
pub fn get_all_voluntary_exits(&self) -> Vec<SignedVoluntaryExit> {
self.voluntary_exits
.read()
.iter()
.map(|(_, exit)| exit.as_inner().clone())
.values()
.map(|exit| exit.as_inner().clone())
.collect()
}

Expand Down
8 changes: 4 additions & 4 deletions beacon_node/operation_pool/src/persistence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ impl<E: EthSpec> PersistedOperationPool<E> {
let proposer_slashings = operation_pool
.proposer_slashings
.read()
.iter()
.map(|(_, slashing)| slashing.clone())
.values()
.cloned()
.collect();

let voluntary_exits = operation_pool
.voluntary_exits
.read()
.iter()
.map(|(_, exit)| exit.clone())
.values()
.cloned()
.collect();

let bls_to_execution_changes = operation_pool
Expand Down
4 changes: 4 additions & 0 deletions testing/execution_engine_integration/src/geth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ pub fn build_result(repo_dir: &Path) -> Output {
Command::new("make")
.arg("geth")
.current_dir(repo_dir)
// Geth now uses the commit hash from a GitHub runner environment variable if it detects a CI environment.
// We need to override this to successfully build Geth in Lighthouse workflows.
// See: https://github.com/ethereum/go-ethereum/blob/668c3a7278af399c0e776e92f1c721b5158388f2/internal/build/env.go#L95-L121
.env("CI", "false")
.output()
.expect("failed to make geth")
}
Expand Down