good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
c92e48ce
Commit
c92e48ce
authored
Mar 4, 2015
by
Taylor Gerring
Browse files
Options
Downloads
Patches
Plain Diff
Add client_version RPC message
parent
e7b33e9a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
eth/backend.go
+4
-1
4 additions, 1 deletion
eth/backend.go
rpc/api.go
+2
-0
2 additions, 0 deletions
rpc/api.go
xeth/xeth.go
+5
-0
5 additions, 0 deletions
xeth/xeth.go
with
11 additions
and
1 deletion
eth/backend.go
+
4
−
1
View file @
c92e48ce
...
@@ -133,6 +133,7 @@ type Ethereum struct {
...
@@ -133,6 +133,7 @@ type Ethereum struct {
logger
ethlogger
.
LogSystem
logger
ethlogger
.
LogSystem
Mining
bool
Mining
bool
version
string
}
}
func
New
(
config
*
Config
)
(
*
Ethereum
,
error
)
{
func
New
(
config
*
Config
)
(
*
Ethereum
,
error
)
{
...
@@ -175,6 +176,7 @@ func New(config *Config) (*Ethereum, error) {
...
@@ -175,6 +176,7 @@ func New(config *Config) (*Ethereum, error) {
blacklist
:
p2p
.
NewBlacklist
(),
blacklist
:
p2p
.
NewBlacklist
(),
eventMux
:
&
event
.
TypeMux
{},
eventMux
:
&
event
.
TypeMux
{},
logger
:
logger
,
logger
:
logger
,
version
:
config
.
Name
,
}
}
eth
.
chainManager
=
core
.
NewChainManager
(
db
,
eth
.
EventMux
())
eth
.
chainManager
=
core
.
NewChainManager
(
db
,
eth
.
EventMux
())
...
@@ -231,6 +233,7 @@ func (s *Ethereum) PeerCount() int { return s.net.PeerCoun
...
@@ -231,6 +233,7 @@ func (s *Ethereum) PeerCount() int { return s.net.PeerCoun
func
(
s
*
Ethereum
)
Peers
()
[]
*
p2p
.
Peer
{
return
s
.
net
.
Peers
()
}
func
(
s
*
Ethereum
)
Peers
()
[]
*
p2p
.
Peer
{
return
s
.
net
.
Peers
()
}
func
(
s
*
Ethereum
)
MaxPeers
()
int
{
return
s
.
net
.
MaxPeers
}
func
(
s
*
Ethereum
)
MaxPeers
()
int
{
return
s
.
net
.
MaxPeers
}
func
(
s
*
Ethereum
)
Coinbase
()
[]
byte
{
return
nil
}
// TODO
func
(
s
*
Ethereum
)
Coinbase
()
[]
byte
{
return
nil
}
// TODO
func
(
s
*
Ethereum
)
ClientVersion
()
string
{
return
s
.
version
}
// Start the ethereum
// Start the ethereum
func
(
s
*
Ethereum
)
Start
()
error
{
func
(
s
*
Ethereum
)
Start
()
error
{
...
...
This diff is collapsed.
Click to expand it.
rpc/api.go
+
2
−
0
View file @
c92e48ce
...
@@ -668,6 +668,8 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
...
@@ -668,6 +668,8 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
return
err
return
err
}
}
return
p
.
WhisperMessages
(
args
,
reply
)
return
p
.
WhisperMessages
(
args
,
reply
)
case
"client_version"
:
*
reply
=
p
.
eth
.
GetClientVersion
()
default
:
default
:
return
NewErrorWithMessage
(
errNotImplemented
,
req
.
Method
)
return
NewErrorWithMessage
(
errNotImplemented
,
req
.
Method
)
}
}
...
...
This diff is collapsed.
Click to expand it.
xeth/xeth.go
+
5
−
0
View file @
c92e48ce
...
@@ -36,6 +36,7 @@ type Backend interface {
...
@@ -36,6 +36,7 @@ type Backend interface {
EventMux
()
*
event
.
TypeMux
EventMux
()
*
event
.
TypeMux
Whisper
()
*
whisper
.
Whisper
Whisper
()
*
whisper
.
Whisper
Miner
()
*
miner
.
Miner
Miner
()
*
miner
.
Miner
ClientVersion
()
string
}
}
type
XEth
struct
{
type
XEth
struct
{
...
@@ -164,6 +165,10 @@ func (self *XEth) IsContract(address string) bool {
...
@@ -164,6 +165,10 @@ func (self *XEth) IsContract(address string) bool {
return
len
(
self
.
State
()
.
SafeGet
(
address
)
.
Code
())
>
0
return
len
(
self
.
State
()
.
SafeGet
(
address
)
.
Code
())
>
0
}
}
func
(
self
*
XEth
)
GetClientVersion
()
string
{
return
self
.
eth
.
ClientVersion
()
}
func
(
self
*
XEth
)
SecretToAddress
(
key
string
)
string
{
func
(
self
*
XEth
)
SecretToAddress
(
key
string
)
string
{
pair
,
err
:=
crypto
.
NewKeyPairFromSec
(
fromHex
(
key
))
pair
,
err
:=
crypto
.
NewKeyPairFromSec
(
fromHex
(
key
))
if
err
!=
nil
{
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment