mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
cmd: remove unused solc config options
This commit is contained in:
parent
43671067fb
commit
aff3c05d3b
9 changed files with 3 additions and 37 deletions
|
|
@ -140,7 +140,6 @@ func init() {
|
|||
utils.MetricsEnabledFlag,
|
||||
utils.FakePoWFlag,
|
||||
utils.NoCompactionFlag,
|
||||
utils.SolcPathFlag,
|
||||
utils.GpoBlocksFlag,
|
||||
utils.GpoPercentileFlag,
|
||||
utils.ExtraDataFlag,
|
||||
|
|
|
|||
|
|
@ -174,12 +174,6 @@ var AppHelpFlagGroups = []flagGroup{
|
|||
utils.WhisperEnabledFlag,
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "MISCELLANEOUS",
|
||||
Flags: []cli.Flag{
|
||||
utils.SolcPathFlag,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -392,11 +392,6 @@ var (
|
|||
Usage: "JavaScript root path for `loadScript`",
|
||||
Value: ".",
|
||||
}
|
||||
SolcPathFlag = cli.StringFlag{
|
||||
Name: "solc",
|
||||
Usage: "Solidity compiler command to be used",
|
||||
Value: "solc",
|
||||
}
|
||||
|
||||
// Gas price oracle settings
|
||||
GpoBlocksFlag = cli.IntFlag{
|
||||
|
|
@ -828,10 +823,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
|
|||
if ctx.GlobalIsSet(GasPriceFlag.Name) {
|
||||
cfg.GasPrice = GlobalBig(ctx, GasPriceFlag.Name)
|
||||
}
|
||||
|
||||
if ctx.GlobalIsSet(SolcPathFlag.Name) {
|
||||
cfg.SolcPath = ctx.GlobalString(SolcPathFlag.Name)
|
||||
}
|
||||
if ctx.GlobalIsSet(VMEnableDebugFlag.Name) {
|
||||
// TODO(fjl): force-enable this in --dev mode
|
||||
cfg.EnablePreimageRecording = ctx.GlobalBool(VMEnableDebugFlag.Name)
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ type Ethereum struct {
|
|||
Mining bool
|
||||
MinerThreads int
|
||||
etherbase common.Address
|
||||
solcPath string
|
||||
|
||||
netVersionId int
|
||||
netRPCService *ethapi.PublicNetAPI
|
||||
|
|
@ -122,7 +121,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
|||
netVersionId: config.NetworkId,
|
||||
etherbase: config.Etherbase,
|
||||
MinerThreads: config.MinerThreads,
|
||||
solcPath: config.SolcPath,
|
||||
}
|
||||
|
||||
if err := addMipmapBloomBins(chainDb); err != nil {
|
||||
|
|
@ -236,7 +234,7 @@ func CreateConsensusEngine(ctx *node.ServiceContext, config *Config, chainConfig
|
|||
// APIs returns the collection of RPC services the ethereum package offers.
|
||||
// NOTE, some of these services probably need to be moved to somewhere else.
|
||||
func (s *Ethereum) APIs() []rpc.API {
|
||||
apis := ethapi.GetAPIs(s.ApiBackend, s.solcPath)
|
||||
apis := ethapi.GetAPIs(s.ApiBackend)
|
||||
|
||||
// Append any APIs exposed explicitly by the consensus engine
|
||||
apis = append(apis, s.engine.APIs(s.BlockChain())...)
|
||||
|
|
|
|||
|
|
@ -105,7 +105,6 @@ type Config struct {
|
|||
EnablePreimageRecording bool
|
||||
|
||||
// Miscellaneous options
|
||||
SolcPath string
|
||||
DocRoot string `toml:"-"`
|
||||
PowFake bool `toml:"-"`
|
||||
PowTest bool `toml:"-"`
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ func (c Config) MarshalTOML() (interface{}, error) {
|
|||
EthashDatasetsOnDisk int
|
||||
GPO gasprice.Config
|
||||
EnablePreimageRecording bool
|
||||
SolcPath string
|
||||
DocRoot string `toml:"-"`
|
||||
PowFake bool `toml:"-"`
|
||||
PowTest bool `toml:"-"`
|
||||
|
|
@ -63,7 +62,6 @@ func (c Config) MarshalTOML() (interface{}, error) {
|
|||
enc.EthashDatasetsOnDisk = c.EthashDatasetsOnDisk
|
||||
enc.GPO = c.GPO
|
||||
enc.EnablePreimageRecording = c.EnablePreimageRecording
|
||||
enc.SolcPath = c.SolcPath
|
||||
enc.DocRoot = c.DocRoot
|
||||
enc.PowFake = c.PowFake
|
||||
enc.PowTest = c.PowTest
|
||||
|
|
@ -94,7 +92,6 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
|
|||
EthashDatasetsOnDisk *int
|
||||
GPO *gasprice.Config
|
||||
EnablePreimageRecording *bool
|
||||
SolcPath *string
|
||||
DocRoot *string `toml:"-"`
|
||||
PowFake *bool `toml:"-"`
|
||||
PowTest *bool `toml:"-"`
|
||||
|
|
@ -167,9 +164,6 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
|
|||
if dec.EnablePreimageRecording != nil {
|
||||
c.EnablePreimageRecording = *dec.EnablePreimageRecording
|
||||
}
|
||||
if dec.SolcPath != nil {
|
||||
c.SolcPath = *dec.SolcPath
|
||||
}
|
||||
if dec.DocRoot != nil {
|
||||
c.DocRoot = *dec.DocRoot
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ type State interface {
|
|||
GetNonce(ctx context.Context, addr common.Address) (uint64, error)
|
||||
}
|
||||
|
||||
func GetAPIs(apiBackend Backend, solcPath string) []rpc.API {
|
||||
func GetAPIs(apiBackend Backend) []rpc.API {
|
||||
return []rpc.API{
|
||||
{
|
||||
Namespace: "eth",
|
||||
|
|
|
|||
|
|
@ -143,11 +143,6 @@ web3._extend({
|
|||
call: 'admin_sleepBlocks',
|
||||
params: 2
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'setSolc',
|
||||
call: 'admin_setSolc',
|
||||
params: 1
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'startRPC',
|
||||
call: 'admin_startRPC',
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ import (
|
|||
|
||||
"github.com/ethereum/go-ethereum/accounts"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/compiler"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
"github.com/ethereum/go-ethereum/consensus"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
|
|
@ -61,8 +60,6 @@ type LightEthereum struct {
|
|||
eventMux *event.TypeMux
|
||||
engine consensus.Engine
|
||||
accountManager *accounts.Manager
|
||||
solcPath string
|
||||
solc *compiler.Solidity
|
||||
|
||||
netVersionId int
|
||||
netRPCService *ethapi.PublicNetAPI
|
||||
|
|
@ -91,7 +88,6 @@ func New(ctx *node.ServiceContext, config *eth.Config) (*LightEthereum, error) {
|
|||
engine: eth.CreateConsensusEngine(ctx, config, chainConfig, chainDb),
|
||||
shutdownChan: make(chan bool),
|
||||
netVersionId: config.NetworkId,
|
||||
solcPath: config.SolcPath,
|
||||
}
|
||||
if eth.blockchain, err = light.NewLightChain(odr, eth.chainConfig, eth.engine, eth.eventMux); err != nil {
|
||||
return nil, err
|
||||
|
|
@ -145,7 +141,7 @@ func (s *LightDummyAPI) Mining() bool {
|
|||
// APIs returns the collection of RPC services the ethereum package offers.
|
||||
// NOTE, some of these services probably need to be moved to somewhere else.
|
||||
func (s *LightEthereum) APIs() []rpc.API {
|
||||
return append(ethapi.GetAPIs(s.ApiBackend, s.solcPath), []rpc.API{
|
||||
return append(ethapi.GetAPIs(s.ApiBackend), []rpc.API{
|
||||
{
|
||||
Namespace: "eth",
|
||||
Version: "1.0",
|
||||
|
|
|
|||
Loading…
Reference in a new issue