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
44d50bc8
Commit
44d50bc8
authored
Sep 26, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Have you seen my parents, sir?
parent
e20b1130
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
block_pool.go
block_pool.go
+2
-1
peer.go
peer.go
+0
-1
No files found.
block_pool.go
View file @
44d50bc8
...
@@ -76,7 +76,8 @@ func (self *BlockPool) SetBlock(b *ethchain.Block, peer *Peer) {
...
@@ -76,7 +76,8 @@ func (self *BlockPool) SetBlock(b *ethchain.Block, peer *Peer) {
self
.
hashPool
=
append
(
self
.
hashPool
,
b
.
Hash
())
self
.
hashPool
=
append
(
self
.
hashPool
,
b
.
Hash
())
self
.
pool
[
hash
]
=
&
block
{
peer
,
peer
,
b
,
time
.
Now
(),
0
}
self
.
pool
[
hash
]
=
&
block
{
peer
,
peer
,
b
,
time
.
Now
(),
0
}
if
!
self
.
eth
.
BlockChain
()
.
HasBlock
(
b
.
PrevHash
)
&&
self
.
pool
[
string
(
b
.
PrevHash
)]
==
nil
{
if
!
self
.
eth
.
BlockChain
()
.
HasBlock
(
b
.
PrevHash
)
{
poollogger
.
Infof
(
"Unknown block, requesting parent (%x...)
\n
"
,
b
.
PrevHash
[
0
:
4
])
peer
.
QueueMessage
(
ethwire
.
NewMessage
(
ethwire
.
MsgGetBlockHashesTy
,
[]
interface
{}{
b
.
PrevHash
,
uint32
(
256
)}))
peer
.
QueueMessage
(
ethwire
.
NewMessage
(
ethwire
.
MsgGetBlockHashesTy
,
[]
interface
{}{
b
.
PrevHash
,
uint32
(
256
)}))
}
}
}
else
if
self
.
pool
[
hash
]
!=
nil
{
}
else
if
self
.
pool
[
hash
]
!=
nil
{
...
...
peer.go
View file @
44d50bc8
...
@@ -344,7 +344,6 @@ out:
...
@@ -344,7 +344,6 @@ out:
// Service timer takes care of peer broadcasting, transaction
// Service timer takes care of peer broadcasting, transaction
// posting or block posting
// posting or block posting
case
<-
serviceTimer
.
C
:
case
<-
serviceTimer
.
C
:
p
.
QueueMessage
(
ethwire
.
NewMessage
(
ethwire
.
MsgGetPeersTy
,
""
))
p
.
QueueMessage
(
ethwire
.
NewMessage
(
ethwire
.
MsgGetPeersTy
,
""
))
case
<-
p
.
quit
:
case
<-
p
.
quit
:
...
...
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