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
f32b72ca
Commit
f32b72ca
authored
Apr 10, 2017
by
Péter Szilágyi
Committed by
GitHub
Apr 10, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13883 from karalabe/boardcast-sync-head
eth: announce block after sync cycle (star topology)
parents
9cd71355
bd2c54fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
sync.go
eth/sync.go
+9
-1
No files found.
eth/sync.go
View file @
f32b72ca
...
...
@@ -189,7 +189,15 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
return
}
atomic
.
StoreUint32
(
&
pm
.
synced
,
1
)
// Mark initial sync done
if
head
:=
pm
.
blockchain
.
CurrentBlock
();
head
.
NumberU64
()
>
0
{
// We've completed a sync cycle, notify all peers of new state. This path is
// essential in star-topology networks where a gateway node needs to notify
// all its out-of-date peers of the availability of a new block. This failure
// scenario will most often crop up in private and hackathon networks with
// degenerate connectivity, but it should be healthy for the mainnet too to
// more reliably update peers or the local TD state.
go
pm
.
BroadcastBlock
(
head
,
false
)
}
// If fast sync was enabled, and we synced up, disable it
if
atomic
.
LoadUint32
(
&
pm
.
fastSync
)
==
1
{
// Disable fast sync if we indeed have something in our chain
...
...
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