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
a009132c
Commit
a009132c
authored
Apr 09, 2015
by
zelig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oops peer unlocked before return - fixes deadlock
parent
0e2bc231
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
blockpool.go
blockpool/blockpool.go
+1
-0
peers.go
blockpool/peers.go
+1
-0
No files found.
blockpool/blockpool.go
View file @
a009132c
...
...
@@ -384,6 +384,7 @@ func (self *BlockPool) AddBlockHashes(next func() (common.Hash, bool), peerId st
// first check if we are building the head section of a peer's chain
if
bestpeer
.
parentHash
==
hash
{
if
self
.
hasBlock
(
bestpeer
.
currentBlockHash
)
{
bestpeer
.
lock
.
RUnlock
()
return
}
/*
...
...
blockpool/peers.go
View file @
a009132c
...
...
@@ -472,6 +472,7 @@ func (self *peer) getBlockHashes() bool {
}
else
{
// XXX added currentBlock check (?)
if
self
.
currentBlock
!=
nil
&&
self
.
currentBlock
.
Td
!=
nil
&&
!
self
.
currentBlock
.
Queued
()
{
plog
.
DebugDetailf
(
"HeadSection: <%s> inserted %s to blockchain... check TD %v =?= %v"
,
self
.
id
,
hex
(
self
.
parentHash
),
self
.
td
,
self
.
currentBlock
.
Td
)
if
self
.
td
.
Cmp
(
self
.
currentBlock
.
Td
)
!=
0
{
self
.
addError
(
ErrIncorrectTD
,
"on block %x"
,
self
.
currentBlockHash
)
self
.
bp
.
status
.
badPeers
[
self
.
id
]
++
...
...
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