eth, les, params: log chain config a bit saner (#24904)

Previously on Geth startup we just logged the chain config is a semi-json-y format. Whilst that worked while we had a handful of hard-forks defined, currently it's kind of unwieldy. 

This PR converts that original data dump and converts it into a user friendly - alas multiline - log output.
This commit is contained in:
Péter Szilágyi
2022-06-07 12:49:07 +02:00
committed by GitHub
parent 450f5da7e1
commit 41e75480df
5 changed files with 88 additions and 32 deletions
+8 -1
View File
@@ -19,6 +19,7 @@ package les
import (
"fmt"
"strings"
"time"
"github.com/ethereum/go-ethereum/accounts"
@@ -96,7 +97,13 @@ func New(stack *node.Node, config *ethconfig.Config) (*LightEthereum, error) {
if _, isCompat := genesisErr.(*params.ConfigCompatError); genesisErr != nil && !isCompat {
return nil, genesisErr
}
log.Info("Initialised chain configuration", "config", chainConfig)
log.Info("")
log.Info(strings.Repeat("-", 153))
for _, line := range strings.Split(chainConfig.String(), "\n") {
log.Info(line)
}
log.Info(strings.Repeat("-", 153))
log.Info("")
peers := newServerPeerSet()
merger := consensus.NewMerger(chainDb)