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
43454053
Commit
43454053
authored
Apr 07, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests
parent
99907f94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
block_cache_test.go
core/block_cache_test.go
+1
-1
responses_test.go
rpc/responses_test.go
+2
-4
No files found.
core/block_cache_test.go
View file @
43454053
...
...
@@ -11,7 +11,7 @@ import (
func
newChain
(
size
int
)
(
chain
[]
*
types
.
Block
)
{
var
parentHash
common
.
Hash
for
i
:=
0
;
i
<
size
;
i
++
{
block
:=
types
.
NewBlock
(
parentHash
,
common
.
Address
{},
common
.
Hash
{},
new
(
big
.
Int
),
0
,
""
)
block
:=
types
.
NewBlock
(
parentHash
,
common
.
Address
{},
common
.
Hash
{},
new
(
big
.
Int
),
0
,
nil
)
block
.
Header
()
.
Number
=
big
.
NewInt
(
int64
(
i
))
chain
=
append
(
chain
,
block
)
parentHash
=
block
.
Hash
()
...
...
rpc/responses_test.go
View file @
43454053
...
...
@@ -31,8 +31,7 @@ func TestNewBlockRes(t *testing.T) {
root
:=
common
.
HexToHash
(
"0x01"
)
difficulty
:=
common
.
Big1
nonce
:=
uint64
(
1
)
extra
:=
""
block
:=
types
.
NewBlock
(
parentHash
,
coinbase
,
root
,
difficulty
,
nonce
,
extra
)
block
:=
types
.
NewBlock
(
parentHash
,
coinbase
,
root
,
difficulty
,
nonce
,
nil
)
tests
:=
map
[
string
]
string
{
"number"
:
reNum
,
"hash"
:
reHash
,
...
...
@@ -81,8 +80,7 @@ func TestNewBlockResWithTrans(t *testing.T) {
root
:=
common
.
HexToHash
(
"0x01"
)
difficulty
:=
common
.
Big1
nonce
:=
uint64
(
1
)
extra
:=
""
block
:=
types
.
NewBlock
(
parentHash
,
coinbase
,
root
,
difficulty
,
nonce
,
extra
)
block
:=
types
.
NewBlock
(
parentHash
,
coinbase
,
root
,
difficulty
,
nonce
,
nil
)
tests
:=
map
[
string
]
string
{
"number"
:
reNum
,
"hash"
:
reHash
,
...
...
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