Merge branch 'hotfix-v5.3.2' of github.com:zcash/zcash
This commit is contained in:
commit
346131a6d1
|
@ -1,4 +1,4 @@
|
||||||
Zcash 5.3.1
|
Zcash 5.3.2
|
||||||
<img align="right" width="120" height="80" src="doc/imgs/logo.png">
|
<img align="right" width="120" height="80" src="doc/imgs/logo.png">
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
|
||||||
AC_PREREQ([2.60])
|
AC_PREREQ([2.60])
|
||||||
define(_CLIENT_VERSION_MAJOR, 5)
|
define(_CLIENT_VERSION_MAJOR, 5)
|
||||||
define(_CLIENT_VERSION_MINOR, 3)
|
define(_CLIENT_VERSION_MINOR, 3)
|
||||||
define(_CLIENT_VERSION_REVISION, 1)
|
define(_CLIENT_VERSION_REVISION, 2)
|
||||||
define(_CLIENT_VERSION_BUILD, 50)
|
define(_CLIENT_VERSION_BUILD, 50)
|
||||||
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
|
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
|
||||||
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
|
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
zcash (5.3.2) stable; urgency=medium
|
||||||
|
|
||||||
|
* 5.3.2 release.
|
||||||
|
|
||||||
|
-- Electric Coin Company <team@electriccoin.co> Sat, 03 Dec 2022 19:58:44 +0000
|
||||||
|
|
||||||
zcash (5.3.1) stable; urgency=medium
|
zcash (5.3.1) stable; urgency=medium
|
||||||
|
|
||||||
* 5.3.1 release.
|
* 5.3.1 release.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: "zcash-5.3.1"
|
name: "zcash-5.3.2"
|
||||||
enable_cache: true
|
enable_cache: true
|
||||||
distro: "debian"
|
distro: "debian"
|
||||||
suites:
|
suites:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
name: "zcash-5.3.1"
|
name: "zcash-5.3.2"
|
||||||
enable_cache: true
|
enable_cache: true
|
||||||
distro: "debian"
|
distro: "debian"
|
||||||
suites:
|
suites:
|
||||||
|
|
|
@ -5,7 +5,7 @@ Jack Grigg (1244)
|
||||||
Kris Nuttycombe (585)
|
Kris Nuttycombe (585)
|
||||||
Simon Liu (460)
|
Simon Liu (460)
|
||||||
Sean Bowe (389)
|
Sean Bowe (389)
|
||||||
Daira Hopwood (364)
|
Daira Hopwood (369)
|
||||||
Eirik Ogilvie-Wigley (216)
|
Eirik Ogilvie-Wigley (216)
|
||||||
Wladimir J. van der Laan (158)
|
Wladimir J. van der Laan (158)
|
||||||
Pieter Wuille (143)
|
Pieter Wuille (143)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||||
.TH ZCASH-CLI "1" "December 2022" "zcash-cli v5.3.1" "User Commands"
|
.TH ZCASH-CLI "1" "December 2022" "zcash-cli v5.3.2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zcash-cli \- manual page for zcash-cli v5.3.1
|
zcash-cli \- manual page for zcash-cli v5.3.2
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Zcash RPC client version v5.3.1
|
Zcash RPC client version v5.3.2
|
||||||
.PP
|
.PP
|
||||||
In order to ensure you are adequately protecting your privacy when using Zcash,
|
In order to ensure you are adequately protecting your privacy when using Zcash,
|
||||||
please see <https://z.cash/support/security/>.
|
please see <https://z.cash/support/security/>.
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||||
.TH ZCASH-TX "1" "December 2022" "zcash-tx v5.3.1" "User Commands"
|
.TH ZCASH-TX "1" "December 2022" "zcash-tx v5.3.2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zcash-tx \- manual page for zcash-tx v5.3.1
|
zcash-tx \- manual page for zcash-tx v5.3.2
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Zcash zcash\-tx utility version v5.3.1
|
Zcash zcash\-tx utility version v5.3.2
|
||||||
.SS "Usage:"
|
.SS "Usage:"
|
||||||
.TP
|
.TP
|
||||||
zcash\-tx [options] <hex\-tx> [commands]
|
zcash\-tx [options] <hex\-tx> [commands]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||||
.TH ZCASHD-WALLET-TOOL "1" "December 2022" "zcashd-wallet-tool v5.3.1" "User Commands"
|
.TH ZCASHD-WALLET-TOOL "1" "December 2022" "zcashd-wallet-tool v5.3.2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zcashd-wallet-tool \- manual page for zcashd-wallet-tool v5.3.1
|
zcashd-wallet-tool \- manual page for zcashd-wallet-tool v5.3.2
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B zcashd-wallet-tool
|
.B zcashd-wallet-tool
|
||||||
[\fI\,OPTIONS\/\fR]
|
[\fI\,OPTIONS\/\fR]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
|
||||||
.TH ZCASHD "1" "December 2022" "zcashd v5.3.1" "User Commands"
|
.TH ZCASHD "1" "December 2022" "zcashd v5.3.2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zcashd \- manual page for zcashd v5.3.1
|
zcashd \- manual page for zcashd v5.3.2
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Zcash Daemon version v5.3.1
|
Zcash Daemon version v5.3.2
|
||||||
.PP
|
.PP
|
||||||
In order to ensure you are adequately protecting your privacy when using Zcash,
|
In order to ensure you are adequately protecting your privacy when using Zcash,
|
||||||
please see <https://z.cash/support/security/>.
|
please see <https://z.cash/support/security/>.
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
Notable changes
|
||||||
|
===============
|
||||||
|
|
||||||
|
Fixed
|
||||||
|
-----
|
||||||
|
|
||||||
|
This is a hotfix release that fixes a regression in memory usage during
|
||||||
|
Initial Block Download. The regression was indirectly caused by a change
|
||||||
|
to prioritize downloading headers (PR #6231), introduced in release 5.3.1.
|
||||||
|
It caused memory usage for new nodes to spike to roughly 11 GiB about an
|
||||||
|
hour after starting Initial Block Download.
|
||||||
|
|
||||||
|
The issue fixed by this release does not affect nodes that start from
|
||||||
|
a fully synced chain, or that had sufficient memory available to get
|
||||||
|
past the memory usage spike.
|
||||||
|
|
||||||
|
Changelog
|
||||||
|
=========
|
||||||
|
|
||||||
|
Daira Hopwood (5):
|
||||||
|
Revert "Headers-first fix"
|
||||||
|
Add release notes for the IBD memory spike issue.
|
||||||
|
Postpone updates.
|
||||||
|
make-release.py: Versioning changes for 5.3.2.
|
||||||
|
make-release.py: Updated manpages for 5.3.2.
|
||||||
|
|
|
@ -4,57 +4,59 @@
|
||||||
# bdb 18.1.40 2020-09-01
|
# bdb 18.1.40 2020-09-01
|
||||||
#
|
#
|
||||||
|
|
||||||
native_cxxbridge 1.0.80 2022-12-03
|
native_cxxbridge 1.0.80 2022-12-10
|
||||||
native_cxxbridge 1.0.81 2022-12-03
|
native_cxxbridge 1.0.81 2022-12-10
|
||||||
native_cxxbridge 1.0.82 2022-12-03
|
native_cxxbridge 1.0.82 2022-12-10
|
||||||
native_rust 1.65.0 2022-12-03
|
native_cxxbridge 1.0.83 2022-12-10
|
||||||
rustcxx 1.0.80 2022-12-03
|
native_rust 1.65.0 2022-12-10
|
||||||
rustcxx 1.0.81 2022-12-03
|
rustcxx 1.0.80 2022-12-10
|
||||||
rustcxx 1.0.82 2022-12-03
|
rustcxx 1.0.81 2022-12-10
|
||||||
utfcpp 3.2.2 2022-12-03
|
rustcxx 1.0.82 2022-12-10
|
||||||
|
rustcxx 1.0.83 2022-12-10
|
||||||
|
utfcpp 3.2.2 2022-12-10
|
||||||
|
|
||||||
# Ccache 4.0 requires adding CMake to the depends system.
|
# Ccache 4.0 requires adding CMake to the depends system.
|
||||||
native_ccache 4.0 2022-12-03
|
native_ccache 4.0 2022-12-10
|
||||||
native_ccache 4.1 2022-12-03
|
native_ccache 4.1 2022-12-10
|
||||||
native_ccache 4.2 2022-12-03
|
native_ccache 4.2 2022-12-10
|
||||||
native_ccache 4.2.1 2022-12-03
|
native_ccache 4.2.1 2022-12-10
|
||||||
native_ccache 4.3 2022-12-03
|
native_ccache 4.3 2022-12-10
|
||||||
native_ccache 4.4 2022-12-03
|
native_ccache 4.4 2022-12-10
|
||||||
native_ccache 4.4.1 2022-12-03
|
native_ccache 4.4.1 2022-12-10
|
||||||
native_ccache 4.4.2 2022-12-03
|
native_ccache 4.4.2 2022-12-10
|
||||||
native_ccache 4.5 2022-12-03
|
native_ccache 4.5 2022-12-10
|
||||||
native_ccache 4.5.1 2022-12-03
|
native_ccache 4.5.1 2022-12-10
|
||||||
native_ccache 4.6 2022-12-03
|
native_ccache 4.6 2022-12-10
|
||||||
native_ccache 4.6.1 2022-12-03
|
native_ccache 4.6.1 2022-12-10
|
||||||
native_ccache 4.6.2 2022-12-03
|
native_ccache 4.6.2 2022-12-10
|
||||||
native_ccache 4.6.3 2022-12-03
|
native_ccache 4.6.3 2022-12-10
|
||||||
native_ccache 4.7 2022-12-03
|
native_ccache 4.7 2022-12-10
|
||||||
native_ccache 4.7.1 2022-12-03
|
native_ccache 4.7.1 2022-12-10
|
||||||
native_ccache 4.7.2 2022-12-03
|
native_ccache 4.7.2 2022-12-10
|
||||||
native_ccache 4.7.3 2022-12-03
|
native_ccache 4.7.3 2022-12-10
|
||||||
native_ccache 4.7.4 2022-12-03
|
native_ccache 4.7.4 2022-12-10
|
||||||
|
|
||||||
# Clang and Rust are currently pinned to LLVM 14
|
# Clang and Rust are currently pinned to LLVM 14
|
||||||
libcxx 15.0.0 2022-12-03
|
libcxx 15.0.0 2022-12-10
|
||||||
libcxx 15.0.1 2022-12-03
|
libcxx 15.0.1 2022-12-10
|
||||||
libcxx 15.0.2 2022-12-03
|
libcxx 15.0.2 2022-12-10
|
||||||
libcxx 15.0.3 2022-12-03
|
libcxx 15.0.3 2022-12-10
|
||||||
libcxx 15.0.4 2022-12-03
|
libcxx 15.0.4 2022-12-10
|
||||||
libcxx 15.0.5 2022-12-03
|
libcxx 15.0.5 2022-12-10
|
||||||
libcxx 15.0.6 2022-12-03
|
libcxx 15.0.6 2022-12-10
|
||||||
native_clang 15.0.0 2022-12-03
|
native_clang 15.0.0 2022-12-10
|
||||||
native_clang 15.0.1 2022-12-03
|
native_clang 15.0.1 2022-12-10
|
||||||
native_clang 15.0.2 2022-12-03
|
native_clang 15.0.2 2022-12-10
|
||||||
native_clang 15.0.3 2022-12-03
|
native_clang 15.0.3 2022-12-10
|
||||||
native_clang 15.0.4 2022-12-03
|
native_clang 15.0.4 2022-12-10
|
||||||
native_clang 15.0.5 2022-12-03
|
native_clang 15.0.5 2022-12-10
|
||||||
native_clang 15.0.6 2022-12-03
|
native_clang 15.0.6 2022-12-10
|
||||||
|
|
||||||
# We're never updating to this version
|
# We're never updating to this version
|
||||||
bdb 18.1.40 2024-02-01
|
bdb 18.1.40 2024-02-01
|
||||||
|
|
||||||
# Google Test 1.10.0 requires adding CMake to the depends system.
|
# Google Test 1.10.0 requires adding CMake to the depends system.
|
||||||
googletest 1.10.0 2022-12-03
|
googletest 1.10.0 2022-12-10
|
||||||
googletest 1.11.0 2022-12-03
|
googletest 1.11.0 2022-12-10
|
||||||
googletest 1.12.0 2022-12-03
|
googletest 1.12.0 2022-12-10
|
||||||
googletest 1.12.1 2022-12-03
|
googletest 1.12.1 2022-12-10
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
|
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
|
||||||
#define CLIENT_VERSION_MAJOR 5
|
#define CLIENT_VERSION_MAJOR 5
|
||||||
#define CLIENT_VERSION_MINOR 3
|
#define CLIENT_VERSION_MINOR 3
|
||||||
#define CLIENT_VERSION_REVISION 1
|
#define CLIENT_VERSION_REVISION 2
|
||||||
#define CLIENT_VERSION_BUILD 50
|
#define CLIENT_VERSION_BUILD 50
|
||||||
|
|
||||||
//! Set to true for release, false for prerelease or test build
|
//! Set to true for release, false for prerelease or test build
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// Per https://zips.z.cash/zip-0200
|
// Per https://zips.z.cash/zip-0200
|
||||||
// Shut down nodes running this version of code, 16 weeks' worth of blocks after the estimated
|
// Shut down nodes running this version of code, 16 weeks' worth of blocks after the estimated
|
||||||
// release block height. A warning is shown during the 14 days' worth of blocks prior to shut down.
|
// release block height. A warning is shown during the 14 days' worth of blocks prior to shut down.
|
||||||
static const int APPROX_RELEASE_HEIGHT = 1898500;
|
static const int APPROX_RELEASE_HEIGHT = 1900500;
|
||||||
static const int RELEASE_TO_DEPRECATION_WEEKS = 16;
|
static const int RELEASE_TO_DEPRECATION_WEEKS = 16;
|
||||||
static const int EXPECTED_BLOCKS_PER_HOUR = 3600 / Consensus::POST_BLOSSOM_POW_TARGET_SPACING;
|
static const int EXPECTED_BLOCKS_PER_HOUR = 3600 / Consensus::POST_BLOSSOM_POW_TARGET_SPACING;
|
||||||
static_assert(EXPECTED_BLOCKS_PER_HOUR == 48, "The value of Consensus::POST_BLOSSOM_POW_TARGET_SPACING was chosen such that this assertion holds.");
|
static_assert(EXPECTED_BLOCKS_PER_HOUR == 48, "The value of Consensus::POST_BLOSSOM_POW_TARGET_SPACING was chosen such that this assertion holds.");
|
||||||
|
|
38
src/main.cpp
38
src/main.cpp
|
@ -332,8 +332,6 @@ struct CNodeState {
|
||||||
CBlockIndex *pindexLastCommonBlock;
|
CBlockIndex *pindexLastCommonBlock;
|
||||||
//! Whether we've started headers synchronization with this peer.
|
//! Whether we've started headers synchronization with this peer.
|
||||||
bool fSyncStarted;
|
bool fSyncStarted;
|
||||||
//! When to potentially disconnect peer for stalling headers download
|
|
||||||
int64_t nHeadersSyncTimeout;
|
|
||||||
//! Since when we're stalling block download progress (in microseconds), or 0.
|
//! Since when we're stalling block download progress (in microseconds), or 0.
|
||||||
int64_t nStallingSince;
|
int64_t nStallingSince;
|
||||||
list<QueuedBlock> vBlocksInFlight;
|
list<QueuedBlock> vBlocksInFlight;
|
||||||
|
@ -350,7 +348,6 @@ struct CNodeState {
|
||||||
hashLastUnknownBlock.SetNull();
|
hashLastUnknownBlock.SetNull();
|
||||||
pindexLastCommonBlock = NULL;
|
pindexLastCommonBlock = NULL;
|
||||||
fSyncStarted = false;
|
fSyncStarted = false;
|
||||||
nHeadersSyncTimeout = 0;
|
|
||||||
nStallingSince = 0;
|
nStallingSince = 0;
|
||||||
nBlocksInFlight = 0;
|
nBlocksInFlight = 0;
|
||||||
nBlocksInFlightValidHeaders = 0;
|
nBlocksInFlightValidHeaders = 0;
|
||||||
|
@ -517,7 +514,7 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<CBl
|
||||||
// Make sure pindexBestKnownBlock is up to date, we'll need it.
|
// Make sure pindexBestKnownBlock is up to date, we'll need it.
|
||||||
ProcessBlockAvailability(nodeid);
|
ProcessBlockAvailability(nodeid);
|
||||||
|
|
||||||
if (state->pindexBestKnownBlock == NULL || state->pindexBestKnownBlock->nChainWork < chainActive.Tip()->nChainWork || state->pindexBestKnownBlock->nChainWork < UintToArith256(Params().GetConsensus().nMinimumChainWork)) {
|
if (state->pindexBestKnownBlock == NULL || state->pindexBestKnownBlock->nChainWork < chainActive.Tip()->nChainWork) {
|
||||||
// This peer has nothing interesting.
|
// This peer has nothing interesting.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -7651,7 +7648,6 @@ bool SendMessages(const Consensus::Params& params, CNode* pto)
|
||||||
// Only actively request headers from a single peer, unless we're close to today.
|
// Only actively request headers from a single peer, unless we're close to today.
|
||||||
if ((nSyncStarted == 0 && fFetch) || pindexBestHeader->GetBlockTime() > GetTime() - 24 * 60 * 60) {
|
if ((nSyncStarted == 0 && fFetch) || pindexBestHeader->GetBlockTime() > GetTime() - 24 * 60 * 60) {
|
||||||
state.fSyncStarted = true;
|
state.fSyncStarted = true;
|
||||||
state.nHeadersSyncTimeout = GetTimeMicros() + HEADERS_DOWNLOAD_TIMEOUT_BASE + HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER * (EstimateNetHeight(params, pindexBestHeader->nHeight, pindexBestHeader->GetBlockTime()) - pindexBestHeader->nHeight);
|
|
||||||
nSyncStarted++;
|
nSyncStarted++;
|
||||||
const CBlockIndex *pindexStart = pindexBestHeader;
|
const CBlockIndex *pindexStart = pindexBestHeader;
|
||||||
/* If possible, start at the block preceding the currently
|
/* If possible, start at the block preceding the currently
|
||||||
|
@ -7837,38 +7833,6 @@ bool SendMessages(const Consensus::Params& params, CNode* pto)
|
||||||
pto->fDisconnect = true;
|
pto->fDisconnect = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Check for headers sync timeouts
|
|
||||||
if (state.fSyncStarted && state.nHeadersSyncTimeout < std::numeric_limits<int64_t>::max()) {
|
|
||||||
// Detect whether this is a stalling initial-headers-sync peer
|
|
||||||
if (pindexBestHeader->GetBlockTime() <= GetTime() - 24*60*60) {
|
|
||||||
if (nNow > state.nHeadersSyncTimeout && nSyncStarted == 1 && (nPreferredDownload - state.fPreferredDownload >= 1)) {
|
|
||||||
// Disconnect a (non-whitelisted) peer if it is our only sync peer,
|
|
||||||
// and we have others we could be using instead.
|
|
||||||
// Note: If all our peers are inbound, then we won't
|
|
||||||
// disconnect our sync peer for stalling; we have bigger
|
|
||||||
// problems if we can't get any outbound peers.
|
|
||||||
if (!pto->fWhitelisted) {
|
|
||||||
LogPrintf("Timeout downloading headers from peer=%d, disconnecting\n", pto->GetId());
|
|
||||||
pto->fDisconnect = true;
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
LogPrintf("Timeout downloading headers from whitelisted peer=%d, not disconnecting\n", pto->GetId());
|
|
||||||
// Reset the headers sync state so that we have a
|
|
||||||
// chance to try downloading from a different peer.
|
|
||||||
// Note: this will also result in at least one more
|
|
||||||
// getheaders message to be sent to
|
|
||||||
// this peer (eventually).
|
|
||||||
state.fSyncStarted = false;
|
|
||||||
nSyncStarted--;
|
|
||||||
state.nHeadersSyncTimeout = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// After we've caught up once, reset the timeout so we can't trigger
|
|
||||||
// disconnect later.
|
|
||||||
state.nHeadersSyncTimeout = std::numeric_limits<int64_t>::max();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Message: getdata (blocks)
|
// Message: getdata (blocks)
|
||||||
|
|
|
@ -98,10 +98,6 @@ static const int DEFAULT_SCRIPTCHECK_THREADS = 0;
|
||||||
static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 16;
|
static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 16;
|
||||||
/** Timeout in seconds during which a peer must stall block download progress before being disconnected. */
|
/** Timeout in seconds during which a peer must stall block download progress before being disconnected. */
|
||||||
static const unsigned int BLOCK_STALLING_TIMEOUT = 2;
|
static const unsigned int BLOCK_STALLING_TIMEOUT = 2;
|
||||||
/** Headers download timeout expressed in microseconds
|
|
||||||
* Timeout = base + per_header * (expected number of headers) */
|
|
||||||
static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_BASE = 30 * 60 * 1000000; // 30 minutes
|
|
||||||
static constexpr int64_t HEADERS_DOWNLOAD_TIMEOUT_PER_HEADER = 10000; // 10 ms/header
|
|
||||||
/** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends
|
/** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends
|
||||||
* less than this number, we reached its tip. Changing this value is a protocol upgrade. */
|
* less than this number, we reached its tip. Changing this value is a protocol upgrade. */
|
||||||
static const unsigned int MAX_HEADERS_RESULTS = 160;
|
static const unsigned int MAX_HEADERS_RESULTS = 160;
|
||||||
|
|
Loading…
Reference in New Issue