Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
4de82138
Commit
4de82138
authored
May 26, 2015
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/geth: fix js console test for p2p server update
parent
68898a4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
js_test.go
cmd/geth/js_test.go
+3
-1
No files found.
cmd/geth/js_test.go
View file @
4de82138
...
@@ -35,6 +35,7 @@ const (
...
@@ -35,6 +35,7 @@ const (
var
(
var
(
versionRE
=
regexp
.
MustCompile
(
strconv
.
Quote
(
`"compilerVersion":"`
+
solcVersion
+
`"`
))
versionRE
=
regexp
.
MustCompile
(
strconv
.
Quote
(
`"compilerVersion":"`
+
solcVersion
+
`"`
))
testNodeKey
=
crypto
.
ToECDSA
(
common
.
Hex2Bytes
(
"4b50fa71f5c3eeb8fdc452224b2395af2fcc3d125e06c32c82e048c0559db03f"
))
testGenesis
=
`{"`
+
testAddress
[
2
:
]
+
`": {"balance": "`
+
testBalance
+
`"}}`
testGenesis
=
`{"`
+
testAddress
[
2
:
]
+
`": {"balance": "`
+
testBalance
+
`"}}`
)
)
...
@@ -72,6 +73,7 @@ func testJEthRE(t *testing.T) (string, *testjethre, *eth.Ethereum) {
...
@@ -72,6 +73,7 @@ func testJEthRE(t *testing.T) (string, *testjethre, *eth.Ethereum) {
ks
:=
crypto
.
NewKeyStorePlain
(
filepath
.
Join
(
tmp
,
"keystore"
))
ks
:=
crypto
.
NewKeyStorePlain
(
filepath
.
Join
(
tmp
,
"keystore"
))
am
:=
accounts
.
NewManager
(
ks
)
am
:=
accounts
.
NewManager
(
ks
)
ethereum
,
err
:=
eth
.
New
(
&
eth
.
Config
{
ethereum
,
err
:=
eth
.
New
(
&
eth
.
Config
{
NodeKey
:
testNodeKey
,
DataDir
:
tmp
,
DataDir
:
tmp
,
AccountManager
:
am
,
AccountManager
:
am
,
MaxPeers
:
0
,
MaxPeers
:
0
,
...
@@ -122,7 +124,7 @@ func TestNodeInfo(t *testing.T) {
...
@@ -122,7 +124,7 @@ func TestNodeInfo(t *testing.T) {
}
}
defer
ethereum
.
Stop
()
defer
ethereum
.
Stop
()
defer
os
.
RemoveAll
(
tmp
)
defer
os
.
RemoveAll
(
tmp
)
want
:=
`{"DiscPort":0,"IP":"0.0.0.0","ListenAddr":"","Name":"test","NodeID":"
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","NodeUrl":"enode://00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000@0.0.0.0:0","TCPPort":0,"Td":"0
"}`
want
:=
`{"DiscPort":0,"IP":"0.0.0.0","ListenAddr":"","Name":"test","NodeID":"
4cb2fc32924e94277bf94b5e4c983beedb2eabd5a0bc941db32202735c6625d020ca14a5963d1738af43b6ac0a711d61b1a06de931a499fe2aa0b1a132a902b5","NodeUrl":"enode://4cb2fc32924e94277bf94b5e4c983beedb2eabd5a0bc941db32202735c6625d020ca14a5963d1738af43b6ac0a711d61b1a06de931a499fe2aa0b1a132a902b5@0.0.0.0:0","TCPPort":0,"Td":"131072
"}`
checkEvalJSON
(
t
,
repl
,
`admin.nodeInfo()`
,
want
)
checkEvalJSON
(
t
,
repl
,
`admin.nodeInfo()`
,
want
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment