cmd: remove unused solc config options

This commit is contained in:
Bas van Kervel 2017-04-12 20:55:38 +02:00
parent 43671067fb
commit aff3c05d3b
No known key found for this signature in database
GPG key ID: BFB23B252EF5812B
9 changed files with 3 additions and 37 deletions

View file

@ -140,7 +140,6 @@ func init() {
utils.MetricsEnabledFlag, utils.MetricsEnabledFlag,
utils.FakePoWFlag, utils.FakePoWFlag,
utils.NoCompactionFlag, utils.NoCompactionFlag,
utils.SolcPathFlag,
utils.GpoBlocksFlag, utils.GpoBlocksFlag,
utils.GpoPercentileFlag, utils.GpoPercentileFlag,
utils.ExtraDataFlag, utils.ExtraDataFlag,

View file

@ -174,12 +174,6 @@ var AppHelpFlagGroups = []flagGroup{
utils.WhisperEnabledFlag, utils.WhisperEnabledFlag,
}, },
}, },
{
Name: "MISCELLANEOUS",
Flags: []cli.Flag{
utils.SolcPathFlag,
},
},
} }
func init() { func init() {

View file

@ -392,11 +392,6 @@ var (
Usage: "JavaScript root path for `loadScript`", Usage: "JavaScript root path for `loadScript`",
Value: ".", Value: ".",
} }
SolcPathFlag = cli.StringFlag{
Name: "solc",
Usage: "Solidity compiler command to be used",
Value: "solc",
}
// Gas price oracle settings // Gas price oracle settings
GpoBlocksFlag = cli.IntFlag{ GpoBlocksFlag = cli.IntFlag{
@ -828,10 +823,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
if ctx.GlobalIsSet(GasPriceFlag.Name) { if ctx.GlobalIsSet(GasPriceFlag.Name) {
cfg.GasPrice = GlobalBig(ctx, GasPriceFlag.Name) cfg.GasPrice = GlobalBig(ctx, GasPriceFlag.Name)
} }
if ctx.GlobalIsSet(SolcPathFlag.Name) {
cfg.SolcPath = ctx.GlobalString(SolcPathFlag.Name)
}
if ctx.GlobalIsSet(VMEnableDebugFlag.Name) { if ctx.GlobalIsSet(VMEnableDebugFlag.Name) {
// TODO(fjl): force-enable this in --dev mode // TODO(fjl): force-enable this in --dev mode
cfg.EnablePreimageRecording = ctx.GlobalBool(VMEnableDebugFlag.Name) cfg.EnablePreimageRecording = ctx.GlobalBool(VMEnableDebugFlag.Name)

View file

@ -79,7 +79,6 @@ type Ethereum struct {
Mining bool Mining bool
MinerThreads int MinerThreads int
etherbase common.Address etherbase common.Address
solcPath string
netVersionId int netVersionId int
netRPCService *ethapi.PublicNetAPI netRPCService *ethapi.PublicNetAPI
@ -122,7 +121,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
netVersionId: config.NetworkId, netVersionId: config.NetworkId,
etherbase: config.Etherbase, etherbase: config.Etherbase,
MinerThreads: config.MinerThreads, MinerThreads: config.MinerThreads,
solcPath: config.SolcPath,
} }
if err := addMipmapBloomBins(chainDb); err != nil { 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. // APIs returns the collection of RPC services the ethereum package offers.
// NOTE, some of these services probably need to be moved to somewhere else. // NOTE, some of these services probably need to be moved to somewhere else.
func (s *Ethereum) APIs() []rpc.API { 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 // Append any APIs exposed explicitly by the consensus engine
apis = append(apis, s.engine.APIs(s.BlockChain())...) apis = append(apis, s.engine.APIs(s.BlockChain())...)

View file

@ -105,7 +105,6 @@ type Config struct {
EnablePreimageRecording bool EnablePreimageRecording bool
// Miscellaneous options // Miscellaneous options
SolcPath string
DocRoot string `toml:"-"` DocRoot string `toml:"-"`
PowFake bool `toml:"-"` PowFake bool `toml:"-"`
PowTest bool `toml:"-"` PowTest bool `toml:"-"`

View file

@ -35,7 +35,6 @@ func (c Config) MarshalTOML() (interface{}, error) {
EthashDatasetsOnDisk int EthashDatasetsOnDisk int
GPO gasprice.Config GPO gasprice.Config
EnablePreimageRecording bool EnablePreimageRecording bool
SolcPath string
DocRoot string `toml:"-"` DocRoot string `toml:"-"`
PowFake bool `toml:"-"` PowFake bool `toml:"-"`
PowTest bool `toml:"-"` PowTest bool `toml:"-"`
@ -63,7 +62,6 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc.EthashDatasetsOnDisk = c.EthashDatasetsOnDisk enc.EthashDatasetsOnDisk = c.EthashDatasetsOnDisk
enc.GPO = c.GPO enc.GPO = c.GPO
enc.EnablePreimageRecording = c.EnablePreimageRecording enc.EnablePreimageRecording = c.EnablePreimageRecording
enc.SolcPath = c.SolcPath
enc.DocRoot = c.DocRoot enc.DocRoot = c.DocRoot
enc.PowFake = c.PowFake enc.PowFake = c.PowFake
enc.PowTest = c.PowTest enc.PowTest = c.PowTest
@ -94,7 +92,6 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
EthashDatasetsOnDisk *int EthashDatasetsOnDisk *int
GPO *gasprice.Config GPO *gasprice.Config
EnablePreimageRecording *bool EnablePreimageRecording *bool
SolcPath *string
DocRoot *string `toml:"-"` DocRoot *string `toml:"-"`
PowFake *bool `toml:"-"` PowFake *bool `toml:"-"`
PowTest *bool `toml:"-"` PowTest *bool `toml:"-"`
@ -167,9 +164,6 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.EnablePreimageRecording != nil { if dec.EnablePreimageRecording != nil {
c.EnablePreimageRecording = *dec.EnablePreimageRecording c.EnablePreimageRecording = *dec.EnablePreimageRecording
} }
if dec.SolcPath != nil {
c.SolcPath = *dec.SolcPath
}
if dec.DocRoot != nil { if dec.DocRoot != nil {
c.DocRoot = *dec.DocRoot c.DocRoot = *dec.DocRoot
} }

View file

@ -72,7 +72,7 @@ type State interface {
GetNonce(ctx context.Context, addr common.Address) (uint64, error) 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{ return []rpc.API{
{ {
Namespace: "eth", Namespace: "eth",

View file

@ -143,11 +143,6 @@ web3._extend({
call: 'admin_sleepBlocks', call: 'admin_sleepBlocks',
params: 2 params: 2
}), }),
new web3._extend.Method({
name: 'setSolc',
call: 'admin_setSolc',
params: 1
}),
new web3._extend.Method({ new web3._extend.Method({
name: 'startRPC', name: 'startRPC',
call: 'admin_startRPC', call: 'admin_startRPC',

View file

@ -23,7 +23,6 @@ import (
"github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common" "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/common/hexutil"
"github.com/ethereum/go-ethereum/consensus" "github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
@ -61,8 +60,6 @@ type LightEthereum struct {
eventMux *event.TypeMux eventMux *event.TypeMux
engine consensus.Engine engine consensus.Engine
accountManager *accounts.Manager accountManager *accounts.Manager
solcPath string
solc *compiler.Solidity
netVersionId int netVersionId int
netRPCService *ethapi.PublicNetAPI netRPCService *ethapi.PublicNetAPI
@ -91,7 +88,6 @@ func New(ctx *node.ServiceContext, config *eth.Config) (*LightEthereum, error) {
engine: eth.CreateConsensusEngine(ctx, config, chainConfig, chainDb), engine: eth.CreateConsensusEngine(ctx, config, chainConfig, chainDb),
shutdownChan: make(chan bool), shutdownChan: make(chan bool),
netVersionId: config.NetworkId, netVersionId: config.NetworkId,
solcPath: config.SolcPath,
} }
if eth.blockchain, err = light.NewLightChain(odr, eth.chainConfig, eth.engine, eth.eventMux); err != nil { if eth.blockchain, err = light.NewLightChain(odr, eth.chainConfig, eth.engine, eth.eventMux); err != nil {
return nil, err return nil, err
@ -145,7 +141,7 @@ func (s *LightDummyAPI) Mining() bool {
// APIs returns the collection of RPC services the ethereum package offers. // APIs returns the collection of RPC services the ethereum package offers.
// NOTE, some of these services probably need to be moved to somewhere else. // NOTE, some of these services probably need to be moved to somewhere else.
func (s *LightEthereum) APIs() []rpc.API { 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", Namespace: "eth",
Version: "1.0", Version: "1.0",