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
c9300458
Commit
c9300458
authored
Apr 29, 2015
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
core: fixed tetst to reflect (int, error) return by insertChain
parent
dfbf5803
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/chain_manager_test.go
+2
-2
2 additions, 2 deletions
core/chain_manager_test.go
eth/downloader/downloader_test.go
+2
-2
2 additions, 2 deletions
eth/downloader/downloader_test.go
with
4 additions
and
4 deletions
core/chain_manager_test.go
+
2
−
2
View file @
c9300458
...
@@ -44,7 +44,7 @@ func testFork(t *testing.T, bman *BlockProcessor, i, N int, f func(td1, td2 *big
...
@@ -44,7 +44,7 @@ func testFork(t *testing.T, bman *BlockProcessor, i, N int, f func(td1, td2 *big
// extend the fork
// extend the fork
parent
:=
bman2
.
bc
.
CurrentBlock
()
parent
:=
bman2
.
bc
.
CurrentBlock
()
chainB
:=
makeChain
(
bman2
,
parent
,
N
,
db
,
ForkSeed
)
chainB
:=
makeChain
(
bman2
,
parent
,
N
,
db
,
ForkSeed
)
err
=
bman2
.
bc
.
InsertChain
(
chainB
)
_
,
err
=
bman2
.
bc
.
InsertChain
(
chainB
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatal
(
"Insert chain error for fork:"
,
err
)
t
.
Fatal
(
"Insert chain error for fork:"
,
err
)
}
}
...
@@ -108,7 +108,7 @@ func loadChain(fn string, t *testing.T) (types.Blocks, error) {
...
@@ -108,7 +108,7 @@ func loadChain(fn string, t *testing.T) (types.Blocks, error) {
}
}
func
insertChain
(
done
chan
bool
,
chainMan
*
ChainManager
,
chain
types
.
Blocks
,
t
*
testing
.
T
)
{
func
insertChain
(
done
chan
bool
,
chainMan
*
ChainManager
,
chain
types
.
Blocks
,
t
*
testing
.
T
)
{
err
:=
chainMan
.
InsertChain
(
chain
)
_
,
err
:=
chainMan
.
InsertChain
(
chain
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Println
(
err
)
fmt
.
Println
(
err
)
t
.
FailNow
()
t
.
FailNow
()
...
...
This diff is collapsed.
Click to expand it.
eth/downloader/downloader_test.go
+
2
−
2
View file @
c9300458
...
@@ -62,10 +62,10 @@ func (dl *downloadTester) hasBlock(hash common.Hash) bool {
...
@@ -62,10 +62,10 @@ func (dl *downloadTester) hasBlock(hash common.Hash) bool {
return
false
return
false
}
}
func
(
dl
*
downloadTester
)
insertChain
(
blocks
types
.
Blocks
)
error
{
func
(
dl
*
downloadTester
)
insertChain
(
blocks
types
.
Blocks
)
(
int
,
error
)
{
dl
.
insertedBlocks
+=
len
(
blocks
)
dl
.
insertedBlocks
+=
len
(
blocks
)
return
nil
return
0
,
nil
}
}
func
(
dl
*
downloadTester
)
getHashes
(
hash
common
.
Hash
)
error
{
func
(
dl
*
downloadTester
)
getHashes
(
hash
common
.
Hash
)
error
{
...
...
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