mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
cmd/faucet: fix configuration
This commit is contained in:
parent
03cf680f04
commit
c507c9d1c9
1 changed files with 15 additions and 11 deletions
|
|
@ -41,11 +41,13 @@ import (
|
|||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/eth"
|
||||
"github.com/ethereum/go-ethereum/eth/gasprice"
|
||||
"github.com/ethereum/go-ethereum/ethclient"
|
||||
"github.com/ethereum/go-ethereum/ethstats"
|
||||
"github.com/ethereum/go-ethereum/les"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/ethereum/go-ethereum/node"
|
||||
"github.com/ethereum/go-ethereum/p2p"
|
||||
"github.com/ethereum/go-ethereum/p2p/discover"
|
||||
"github.com/ethereum/go-ethereum/p2p/discv5"
|
||||
"github.com/ethereum/go-ethereum/p2p/nat"
|
||||
|
|
@ -178,12 +180,15 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network i
|
|||
Name: "geth",
|
||||
Version: params.Version,
|
||||
DataDir: filepath.Join(os.Getenv("HOME"), ".faucet"),
|
||||
P2P: p2p.Config{
|
||||
NAT: nat.Any(),
|
||||
NoDiscovery: true,
|
||||
DiscoveryV5: true,
|
||||
ListenAddr: fmt.Sprintf(":%d", port),
|
||||
DiscoveryV5Addr: fmt.Sprintf(":%d", port+1),
|
||||
MaxPeers: 25,
|
||||
BootstrapNodesV5: enodes,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -195,8 +200,7 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network i
|
|||
NetworkId: network,
|
||||
Genesis: genesis,
|
||||
GasPrice: big.NewInt(20 * params.Shannon),
|
||||
GpoBlocks: 10,
|
||||
GpoPercentile: 50,
|
||||
GPO: gasprice.Config{Blocks: 10, Percentile: 50},
|
||||
EthashCacheDir: "ethash",
|
||||
EthashCachesInMem: 2,
|
||||
EthashCachesOnDisk: 3,
|
||||
|
|
|
|||
Loading…
Reference in a new issue