Skip to content

Commit 2726b79

Browse files
authored
fix: wrap forkid entry for eth key (#16616)
1 parent fee128d commit 2726b79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/net/network/src/manager.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ use crate::{
3737
};
3838
use futures::{Future, StreamExt};
3939
use parking_lot::Mutex;
40+
use reth_chainspec::EnrForkIdEntry;
4041
use reth_eth_wire::{DisconnectReason, EthNetworkPrimitives, NetworkPrimitives};
4142
use reth_fs_util::{self as fs, FsPathError};
4243
use reth_metrics::common::mpsc::UnboundedMeteredSender;
@@ -268,7 +269,9 @@ impl<N: NetworkPrimitives> NetworkManager<N> {
268269
if let Some(disc_config) = discovery_v4_config.as_mut() {
269270
// merge configured boot nodes
270271
disc_config.bootstrap_nodes.extend(resolved_boot_nodes.clone());
271-
disc_config.add_eip868_pair("eth", status.forkid);
272+
// add the forkid entry for EIP-868, but wrap it in an `EnrForkIdEntry` for proper
273+
// encoding
274+
disc_config.add_eip868_pair("eth", EnrForkIdEntry::from(status.forkid));
272275
}
273276

274277
if let Some(discv5) = discovery_v5_config.as_mut() {

0 commit comments

Comments
 (0)