cmd/utils, node: remove unused solc references and improve RPC config (#14324)

Currently http cors and websocket origins are a comma separated string in the
config object. These are replaced with string arrays that are more expressive in
case of a config file.
This commit is contained in:
bas-vk
2017-04-12 23:04:14 +02:00
committed by Felix Lange
parent 43671067fb
commit 5e29f4be93
15 changed files with 38 additions and 67 deletions

View File

@ -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",