Skip to content

Commit

Permalink
fix(net): re-use op stack enr key
Browse files Browse the repository at this point in the history
  • Loading branch information
refcell committed Aug 26, 2024
1 parent 20d8f38 commit 325e24e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/net/src/discovery/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ use discv5::{
};
use eyre::Result;

use crate::types::enr::OP_CL_KEY;

/// Discovery service builder.
#[derive(Debug, Default, Clone)]
pub struct DiscoveryBuilder {
Expand Down Expand Up @@ -45,7 +47,7 @@ impl DiscoveryBuilder {
let opstack_data: Vec<u8> = opstack.into();

let key = CombinedKey::generate_secp256k1();
let enr = Enr::builder().add_value_rlp("opstack", opstack_data.into()).build(&key)?;
let enr = Enr::builder().add_value_rlp(OP_CL_KEY, opstack_data.into()).build(&key)?;
let listen_config = ListenConfig::from_ip(addr.ip.into(), addr.port);
let config = ConfigBuilder::new(listen_config).build();

Expand Down

0 comments on commit 325e24e

Please sign in to comment.