Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
Merge Wallet
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Boards
Labels
Milestones
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Merge
Merge Wallet
Commits
da70f8be
Commit
da70f8be
authored
Jun 11, 2019
by
barrystyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
massively improve sync speed
parent
db79ad7d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/main.cpp
src/main.cpp
+2
-2
src/main.h
src/main.h
+1
-1
No files found.
src/main.cpp
View file @
da70f8be
...
...
@@ -2789,7 +2789,7 @@ bool ActivateBestChain(CValidationState& state, CBlock* pblock, bool fAlreadyChe
uiInterface
.
NotifyBlockTip
(
hashNewTip
);
}
}
while
(
pindexMostWork
!=
chainActive
.
Tip
());
CheckBlockIndex
();
//
CheckBlockIndex();
// Write changes periodically to disk, after relay.
if
(
!
FlushStateToDisk
(
state
,
FLUSH_STATE_PERIODIC
))
{
...
...
@@ -3600,7 +3600,7 @@ bool ProcessNewBlock(CValidationState& state, CNode* pfrom, CBlock* pblock, CDis
if
(
pindex
&&
pfrom
)
{
mapBlockSource
[
pindex
->
GetBlockHash
()]
=
pfrom
->
GetId
();
}
CheckBlockIndex
();
//
CheckBlockIndex ();
if
(
!
ret
)
return
error
(
"%s : AcceptBlock FAILED"
,
__func__
);
}
...
...
src/main.h
View file @
da70f8be
...
...
@@ -88,7 +88,7 @@ static const int MAX_SCRIPTCHECK_THREADS = 16;
/** -par default (number of script-checking threads, 0 = auto) */
static
const
int
DEFAULT_SCRIPTCHECK_THREADS
=
0
;
/** Number of blocks that can be requested at any given time from a single peer. */
static
const
int
MAX_BLOCKS_IN_TRANSIT_PER_PEER
=
128
;
static
const
int
MAX_BLOCKS_IN_TRANSIT_PER_PEER
=
256
;
/** Timeout in seconds during which a peer must stall block download progress before being disconnected. */
static
const
unsigned
int
BLOCK_STALLING_TIMEOUT
=
2
;
/** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends
...
...
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