mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
Hủy bỏ thông tin không cần thiết
This commit is contained in:
parent
3bd777e2a5
commit
12a5c130b1
6 changed files with 9 additions and 10 deletions
|
|
@ -832,7 +832,8 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {
|
||||||
if lightClient {
|
if lightClient {
|
||||||
ethPeers = 0
|
ethPeers = 0
|
||||||
}
|
}
|
||||||
log.Info("Maximum peer count", "ETH", ethPeers, "LES", lightPeers, "total", cfg.MaxPeers)
|
log.Info("Welcome to Geth of EtherFact", "Cảm ơn bạn đã sử dụng Geth của EtherFact ^^!")
|
||||||
|
log.Info("Maximum peer count", "ETHF", ethPeers, "LES", lightPeers, "total", cfg.MaxPeers)
|
||||||
|
|
||||||
if ctx.GlobalIsSet(MaxPendingPeersFlag.Name) {
|
if ctx.GlobalIsSet(MaxPendingPeersFlag.Name) {
|
||||||
cfg.MaxPendingPeers = ctx.GlobalInt(MaxPendingPeersFlag.Name)
|
cfg.MaxPendingPeers = ctx.GlobalInt(MaxPendingPeersFlag.Name)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Package hexutil implements hex encoding with 0x prefix.
|
Package hexutil implements hex encoding with 0x prefix.
|
||||||
This encoding is used by the Ethereum RPC API to transport binary data in JSON payloads.
|
This encoding is used by the EtherFact RPC API to transport binary data in JSON payloads.
|
||||||
|
|
||||||
Encoding Rules
|
Encoding Rules
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MakeName creates a node name that follows the ethereum convention
|
// MakeName creates a node name that follows the etherfact convention
|
||||||
// for such names. It adds the operation system name and Go runtime version
|
// for such names. It adds the operation system name and Go runtime version
|
||||||
// the name.
|
// the name.
|
||||||
func MakeName(name, version string) string {
|
func MakeName(name, version string) string {
|
||||||
|
|
|
||||||
|
|
@ -99,8 +99,8 @@ func (s *Ethereum) AddLesServer(ls LesServer) {
|
||||||
ls.SetBloomBitsIndexer(s.bloomIndexer)
|
ls.SetBloomBitsIndexer(s.bloomIndexer)
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new Ethereum object (including the
|
// New creates a new EtherFact object (including the
|
||||||
// initialisation of the common Ethereum object)
|
// initialisation of the common EtherFact object)
|
||||||
func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
||||||
if config.SyncMode == downloader.LightSync {
|
if config.SyncMode == downloader.LightSync {
|
||||||
return nil, errors.New("can't run eth.Ethereum in light sync mode, use les.LightEthereum")
|
return nil, errors.New("can't run eth.Ethereum in light sync mode, use les.LightEthereum")
|
||||||
|
|
@ -117,7 +117,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
||||||
if _, ok := genesisErr.(*params.ConfigCompatError); genesisErr != nil && !ok {
|
if _, ok := genesisErr.(*params.ConfigCompatError); genesisErr != nil && !ok {
|
||||||
return nil, genesisErr
|
return nil, genesisErr
|
||||||
}
|
}
|
||||||
log.Info("Initialised chain configuration", "config", chainConfig)
|
|
||||||
|
|
||||||
eth := &Ethereum{
|
eth := &Ethereum{
|
||||||
config: config,
|
config: config,
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,6 @@ func New(ctx *node.ServiceContext, config *eth.Config) (*LightEthereum, error) {
|
||||||
if _, isCompat := genesisErr.(*params.ConfigCompatError); genesisErr != nil && !isCompat {
|
if _, isCompat := genesisErr.(*params.ConfigCompatError); genesisErr != nil && !isCompat {
|
||||||
return nil, genesisErr
|
return nil, genesisErr
|
||||||
}
|
}
|
||||||
log.Info("Initialised chain configuration", "config", chainConfig)
|
|
||||||
|
|
||||||
peers := newPeerSet()
|
peers := newPeerSet()
|
||||||
quitSync := make(chan struct{})
|
quitSync := make(chan struct{})
|
||||||
|
|
|
||||||
|
|
@ -55,11 +55,11 @@ func DefaultDataDir() string {
|
||||||
home := homeDir()
|
home := homeDir()
|
||||||
if home != "" {
|
if home != "" {
|
||||||
if runtime.GOOS == "darwin" {
|
if runtime.GOOS == "darwin" {
|
||||||
return filepath.Join(home, "Library", "Ethereum")
|
return filepath.Join(home, "Library", "EtherFact")
|
||||||
} else if runtime.GOOS == "windows" {
|
} else if runtime.GOOS == "windows" {
|
||||||
return filepath.Join(home, "AppData", "Roaming", "Ethereum")
|
return filepath.Join(home, "AppData", "Roaming", "EtherFact")
|
||||||
} else {
|
} else {
|
||||||
return filepath.Join(home, ".ethereum")
|
return filepath.Join(home, ".etherfact")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// As we cannot guess a stable location, return empty and handle later
|
// As we cannot guess a stable location, return empty and handle later
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue