Skip to content

Commit 935db19

Browse files
committed
Clean up
1 parent 1ea20d0 commit 935db19

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

beacon_node/beacon_chain/src/custody_context.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use std::{
77
sync::atomic::{AtomicU64, Ordering},
88
};
99
use tracing::{debug, warn};
10-
use types::data_column_custody_group::{CustodyIndex, compute_columns_for_custody_group};
1110
use types::{ChainSpec, ColumnIndex, Epoch, EthSpec, Slot};
1211

1312
/// A delay before making the CGC change effective to the data availability checker.
@@ -504,7 +503,7 @@ impl<E: EthSpec> CustodyContext<E> {
504503

505504
// This is an unnecessary conversion for spec compliance, basically just multiplying by 1.
506505
let columns_per_custody_group = spec.data_columns_per_group::<E>() as usize;
507-
let custody_column_count = columns_per_custody_group * (custody_group_count);
506+
let custody_column_count = columns_per_custody_group * custody_group_count;
508507

509508
&self.ordered_custody_column_indices[..custody_column_count]
510509
}

beacon_node/client/src/builder.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,10 @@ where
193193
Kzg::new_from_trusted_setup_no_precomp(&config.trusted_setup).map_err(kzg_err_msg)?
194194
};
195195

196-
let ordered_custody_column_indices = compute_ordered_custody_column_indices(node_id, &spec)
197-
.map_err(|e| format!("Failed to compute ordered custody column indices: {:?}", e))?;
196+
let ordered_custody_column_indices =
197+
compute_ordered_custody_column_indices::<E>(node_id, &spec).map_err(|e| {
198+
format!("Failed to compute ordered custody column indices: {:?}", e)
199+
})?;
198200

199201
let builder = BeaconChainBuilder::new(eth_spec_instance, Arc::new(kzg))
200202
.store(store)
@@ -215,12 +217,6 @@ where
215217
.map_err(|e| format!("Failed to create RNG: {:?}", e))?,
216218
));
217219

218-
// FIXME: remove
219-
println!(
220-
"ordered_custody_column_indices: {:?}",
221-
ordered_custody_column_indices
222-
);
223-
224220
let builder = if let Some(slasher) = self.slasher.clone() {
225221
builder.slasher(slasher)
226222
} else {

beacon_node/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ impl<E: EthSpec> ProductionBeaconNode<E> {
122122
builder
123123
};
124124

125+
// Generate or load the node id.
125126
let local_keypair = load_private_key(&client_config.network);
126-
// ASSERT same result
127127
let node_id = peer_id_to_node_id(&local_keypair.public().to_peer_id())?.raw();
128+
128129
let builder = builder
129130
.beacon_chain_builder(client_genesis, client_config.clone(), node_id)
130131
.await?;
@@ -200,7 +201,6 @@ impl lighthouse_network::discv5::Executor for Discv5Executor {
200201
#[cfg(test)]
201202
mod test {
202203
use super::*;
203-
204204
use types::MainnetEthSpec;
205205

206206
#[test]

common/network_utils/src/enr_ext.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ pub fn peer_id_to_node_id(peer_id: &PeerId) -> Result<discv5::enr::NodeId, Strin
353353

354354
#[cfg(test)]
355355
mod tests {
356+
356357
use super::*;
357358

358359
#[test]

0 commit comments

Comments
 (0)