Undo client_version changes
This commit is contained in:
		
							parent
							
								
									fb23a0cfe0
								
							
						
					
					
						commit
						9723191b19
					
				| @ -31,6 +31,7 @@ import ( | ||||
| 	"github.com/ethereum/go-ethereum/eth" | ||||
| 	"github.com/ethereum/go-ethereum/ethutil" | ||||
| 	"github.com/ethereum/go-ethereum/logger" | ||||
| 	"github.com/ethereum/go-ethereum/p2p" | ||||
| 	"github.com/ethereum/go-ethereum/state" | ||||
| ) | ||||
| 
 | ||||
| @ -61,7 +62,7 @@ func main() { | ||||
| 	utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") | ||||
| 
 | ||||
| 	ethereum, err := eth.New(ð.Config{ | ||||
| 		Name:         ethutil.MakeVersion(ClientIdentifier, Version), | ||||
| 		Name:         p2p.MakeName(ClientIdentifier, Version), | ||||
| 		KeyStore:     KeyStore, | ||||
| 		DataDir:      Datadir, | ||||
| 		LogFile:      LogFile, | ||||
|  | ||||
| @ -28,8 +28,8 @@ import ( | ||||
| 
 | ||||
| 	"github.com/ethereum/go-ethereum/cmd/utils" | ||||
| 	"github.com/ethereum/go-ethereum/eth" | ||||
| 	"github.com/ethereum/go-ethereum/ethutil" | ||||
| 	"github.com/ethereum/go-ethereum/logger" | ||||
| 	"github.com/ethereum/go-ethereum/p2p" | ||||
| 	"github.com/ethereum/go-ethereum/ui/qt/webengine" | ||||
| 	"github.com/obscuren/qml" | ||||
| ) | ||||
| @ -52,7 +52,7 @@ func run() error { | ||||
| 	config := utils.InitConfig(VmType, ConfigFile, Datadir, "ETH") | ||||
| 
 | ||||
| 	ethereum, err := eth.New(ð.Config{ | ||||
| 		Name:         ethutil.MakeVersion(ClientIdentifier, Version), | ||||
| 		Name:         p2p.MakeName(ClientIdentifier, Version), | ||||
| 		KeyStore:     KeyStore, | ||||
| 		DataDir:      Datadir, | ||||
| 		LogFile:      LogFile, | ||||
|  | ||||
| @ -132,8 +132,7 @@ type Ethereum struct { | ||||
| 
 | ||||
| 	logger ethlogger.LogSystem | ||||
| 
 | ||||
| 	Mining  bool | ||||
| 	version string | ||||
| 	Mining bool | ||||
| } | ||||
| 
 | ||||
| func New(config *Config) (*Ethereum, error) { | ||||
| @ -176,7 +175,6 @@ func New(config *Config) (*Ethereum, error) { | ||||
| 		blacklist:    p2p.NewBlacklist(), | ||||
| 		eventMux:     &event.TypeMux{}, | ||||
| 		logger:       logger, | ||||
| 		version:      config.Name, | ||||
| 	} | ||||
| 
 | ||||
| 	eth.chainManager = core.NewChainManager(db, eth.EventMux()) | ||||
| @ -233,7 +231,6 @@ func (s *Ethereum) PeerCount() int                       { return s.net.PeerCoun | ||||
| func (s *Ethereum) Peers() []*p2p.Peer                   { return s.net.Peers() } | ||||
| func (s *Ethereum) MaxPeers() int                        { return s.net.MaxPeers } | ||||
| func (s *Ethereum) Coinbase() []byte                     { return nil } // TODO
 | ||||
| func (s *Ethereum) ClientVersion() string                { return s.version } | ||||
| 
 | ||||
| // Start the ethereum
 | ||||
| func (s *Ethereum) Start() error { | ||||
|  | ||||
| @ -13,10 +13,6 @@ import ( | ||||
| 	"github.com/kardianos/osext" | ||||
| ) | ||||
| 
 | ||||
| func MakeVersion(name, version string) string { | ||||
| 	return fmt.Sprintf("%s/v%s/%s/%s", name, version, runtime.GOOS, runtime.Version()) | ||||
| } | ||||
| 
 | ||||
| func DefaultAssetPath() string { | ||||
| 	var assetPath string | ||||
| 	pwd, _ := os.Getwd() | ||||
|  | ||||
| @ -6,6 +6,7 @@ import ( | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| 	"net" | ||||
| 	"runtime" | ||||
| 	"sync" | ||||
| 	"time" | ||||
| 
 | ||||
| @ -23,6 +24,13 @@ const ( | ||||
| var srvlog = logger.NewLogger("P2P Server") | ||||
| var srvjslog = logger.NewJsonLogger() | ||||
| 
 | ||||
| // MakeName creates a node name that follows the ethereum convention
 | ||||
| // for such names. It adds the operation system name and Go runtime version
 | ||||
| // the name.
 | ||||
| func MakeName(name, version string) string { | ||||
| 	return fmt.Sprintf("%s/v%s/%s/%s", name, version, runtime.GOOS, runtime.Version()) | ||||
| } | ||||
| 
 | ||||
| // Server manages all peer connections.
 | ||||
| //
 | ||||
| // The fields of Server are used as configuration parameters.
 | ||||
| @ -37,7 +45,7 @@ type Server struct { | ||||
| 	MaxPeers int | ||||
| 
 | ||||
| 	// Name sets the node name of this server.
 | ||||
| 	// Use ethutil.MakeVersion to create a name that follows existing conventions.
 | ||||
| 	// Use MakeName to create a name that follows existing conventions.
 | ||||
| 	Name string | ||||
| 
 | ||||
| 	// Bootstrap nodes are used to establish connectivity
 | ||||
|  | ||||
| @ -609,8 +609,6 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error | ||||
| 			return err | ||||
| 		} | ||||
| 		return p.WhisperMessages(args.Id, reply) | ||||
| 	case "client_version": | ||||
| 		*reply = p.eth.GetClientVersion() | ||||
| 	// case "eth_register":
 | ||||
| 	// 	args, err := req.ToRegisterArgs()
 | ||||
| 	// 	if err != nil {
 | ||||
|  | ||||
| @ -36,7 +36,6 @@ type Backend interface { | ||||
| 	EventMux() *event.TypeMux | ||||
| 	Whisper() *whisper.Whisper | ||||
| 	Miner() *miner.Miner | ||||
| 	ClientVersion() string | ||||
| } | ||||
| 
 | ||||
| type XEth struct { | ||||
| @ -165,10 +164,6 @@ func (self *XEth) IsContract(address string) bool { | ||||
| 	return len(self.State().SafeGet(address).Code()) > 0 | ||||
| } | ||||
| 
 | ||||
| func (self *XEth) GetClientVersion() string { | ||||
| 	return self.eth.ClientVersion() | ||||
| } | ||||
| 
 | ||||
| func (self *XEth) SecretToAddress(key string) string { | ||||
| 	pair, err := crypto.NewKeyPairFromSec(fromHex(key)) | ||||
| 	if err != nil { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user