eth: set networkID to chainID by default (#28250)

Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
Marius van der Wijden
2023-11-07 14:21:46 +01:00
committed by GitHub
co-authored by Felix Lange
parent f20b334f21
commit 4d9f3cd5d7
3 changed files with 13 additions and 8 deletions
+4 -3
View File
@@ -59,7 +59,7 @@ var LightClientGPO = gasprice.Config{
// Defaults contains default settings for use on the Ethereum main net.
var Defaults = Config{
SyncMode: downloader.SnapSync,
NetworkId: 1,
NetworkId: 0, // enable auto configuration of networkID == chainID
TxLookupLimit: 2350000,
TransactionHistory: 2350000,
StateHistory: params.FullImmutabilityThreshold,
@@ -87,8 +87,9 @@ type Config struct {
// If nil, the Ethereum main net block is used.
Genesis *core.Genesis `toml:",omitempty"`
// Protocol options
NetworkId uint64 // Network ID to use for selecting peers to connect to
// Network ID separates blockchains on the peer-to-peer networking level. When left
// zero, the chain ID is used as network ID.
NetworkId uint64
SyncMode downloader.SyncMode
// This can be set to list of enrtree:// URLs which will be queried for