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
382d35bf
Commit
382d35bf
authored
Aug 19, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1688 from karalabe/fix-double-imports
eth: fix an issue with pulling and inserting blocks twice
parents
c6a11fe3
941920f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
handler.go
eth/handler.go
+4
-2
No files found.
eth/handler.go
View file @
382d35bf
...
@@ -413,11 +413,13 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
...
@@ -413,11 +413,13 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
pm
.
fetcher
.
Enqueue
(
p
.
id
,
request
.
Block
)
pm
.
fetcher
.
Enqueue
(
p
.
id
,
request
.
Block
)
//
TODO: Schedule a sync to cover potential gaps (this needs proto update)
//
Update the peers total difficulty if needed, schedule a download if gapped
if
request
.
TD
.
Cmp
(
p
.
Td
())
>
0
{
if
request
.
TD
.
Cmp
(
p
.
Td
())
>
0
{
p
.
SetTd
(
request
.
TD
)
p
.
SetTd
(
request
.
TD
)
if
request
.
TD
.
Cmp
(
new
(
big
.
Int
)
.
Add
(
pm
.
chainman
.
Td
(),
request
.
Block
.
Difficulty
()))
>
0
{
go
pm
.
synchronise
(
p
)
go
pm
.
synchronise
(
p
)
}
}
}
case
TxMsg
:
case
TxMsg
:
// Transactions arrived, parse all of them and deliver to the pool
// Transactions arrived, parse all of them and deliver to the pool
...
...
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