Skip to content

Commit e2436ab

Browse files
committed
Fix time based settings and return old proto version support.
Correct time settings Return support connect from old protocol versions for old solutions from BTC ( not return support old node before fork ) Fix setting test network. Fix testnetwork ports. pump version. I recommend update to this version if you need old node for out dated software. Otherwise upgrade to the latest version based on 24.0.1
1 parent 5f4e860 commit e2436ab

File tree

6 files changed

+29
-17
lines changed

6 files changed

+29
-17
lines changed

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
22
AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 0)
44
define(_CLIENT_VERSION_MINOR, 16)
5-
define(_CLIENT_VERSION_REVISION, 3)
6-
define(_CLIENT_VERSION_BUILD, 1)
5+
define(_CLIENT_VERSION_REVISION, 4)
6+
define(_CLIENT_VERSION_BUILD, 0)
77
define(_CLIENT_VERSION_IS_RELEASE, true)
88
define(_COPYRIGHT_YEAR, 2023)
99
define(_COPYRIGHT_HOLDERS,[The %s developers])

src/chain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* Maximum amount of time that a block timestamp is allowed to exceed the
2020
* current network-adjusted time before the block will be accepted.
2121
*/
22-
static const int64_t MAX_FUTURE_BLOCK_TIME = 2 * 60 * 60;
22+
static const int64_t MAX_FUTURE_BLOCK_TIME = 60 * 5; // = ~Block time * N param 90 / 20
2323

2424
/**
2525
* Timestamp window used as a grace period by code that compares external

src/chainparams.cpp

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,17 @@ class CMainParams : public CChainParams {
147147
checkpointData = {
148148
{
149149
{0, uint256S("0x00043e9c6bc54d9bd266c3767a83a7b9da435dd7f84e485a2bf2a869be62f1f3")},
150+
{1, uint256S("0x001d498cbcd92d9b36fee933caf1551dd457bf710ec988e033faca697aff6a90")},
151+
{15, uint256S("0x0013c1537f3c4984241c3c5b93d894dfef491eef0b82d87a5b7d0edf65961a41")},
152+
{31, uint256S("0x000c6f6a7e9478859051e24eaaa0aec508583bc1fc262108804479be5c557d74")},
153+
{47, uint256S("0x001c6020b3d984739d307fa9f2adb897339449c23dbe78bb50fc365daf41b704")},
154+
{63, uint256S("0x00015b10a4a824ad4751c64d4027c82219f312c40f1aff2e9248355a8707347f")},
155+
{79, uint256S("0x00001f6f577a1f232a117a8f16f4efb93fc1407fbec156ac1fea7d621db84ed8")},
156+
{89, uint256S("0x0001f2ee3cafa3a390d5f8f368e1296b4fbf55719c10d170223df30b9836cf5b")},
157+
{90, uint256S("0x00023c2933e8069729e6d568038ea070f5c50a07145ca960e8e21a53e0640e26")},
158+
{97, uint256S("0x00046f205cad5e5085a939194e308d9569553d435f0fe1e3a13c99b0d34f76b1")},
150159
{662, uint256S("0x00021b08ddf59cd9d9e396ef46c6d57644b3aac7977d271c966f66b63df45dd1")},
160+
{2000, uint256S("0x000002bf997a02b3e403c8ce9a87699127864e344ed966b03be16e14e5662cf5")},
151161
{9074, uint256S("0x0000007e1d70d529752b87fe47f979ae5f8f27bbc987dd0c8b21c9c5a6f3099b")},
152162
{12167, uint256S("0x0000006fa4023de2a1d4bd712e7d7aafa15a273f6c78b32bd87185846e0cc903")},
153163
{606942, uint256S("0x0000000d7c7c25d0e2a8a8ff4013ae7154ba2d0c0217dc71b942f41af7be990a")},
@@ -173,13 +183,13 @@ class CTestNetParams : public CChainParams {
173183
CTestNetParams() {
174184
strNetworkID = "test";
175185
consensus.nSubsidyHalvingInterval = 840000;
176-
consensus.BIP16Height = 0;
177-
consensus.BIP34Height = 0;
186+
consensus.BIP16Height = 17;
187+
consensus.BIP34Height = 1;
178188
consensus.BIP34Hash = uint256S("0x00002a542f15e4f95e6256e5fc37532ad965e5874b4f5c4aaab75c792f184f63");
179-
consensus.BIP65Height = 0;
180-
consensus.BIP66Height = 0;
189+
consensus.BIP65Height = 1;
190+
consensus.BIP66Height = 1;
181191
consensus.powLimit = uint256S("0x3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
182-
consensus.nPowTargetTimespan = 24 * 60 * 60;
192+
consensus.nPowTargetTimespan = 60 * 60;
183193
consensus.nPowTargetSpacing = 60;
184194
consensus.nZawyLwmaAveragingWindow = 90;
185195
consensus.fPowAllowMinDifficultyBlocks = true;
@@ -210,7 +220,7 @@ class CTestNetParams : public CChainParams {
210220
pchMessageStart[1] = 0xbe;
211221
pchMessageStart[2] = 0xdc;
212222
pchMessageStart[3] = 0xfe;
213-
nDefaultPort = 29706;
223+
nDefaultPort = 11604;
214224
nPruneAfterHeight = 1000;
215225

216226
genesis = CreateGenesisBlock(1619971765, 18156, 0x1e3fffff, 1, 50 * COIN);
@@ -220,6 +230,8 @@ class CTestNetParams : public CChainParams {
220230

221231
vFixedSeeds.clear();
222232
vSeeds.clear();
233+
234+
vSeeds.emplace_back("seedtestnet.bitwebcore.net");
223235

224236
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,66); // legacy: starting with T (upper)
225237
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
@@ -262,10 +274,10 @@ class CRegTestParams : public CChainParams {
262274
consensus.BIP16Height = 0;
263275
consensus.BIP34Height = 17;
264276
consensus.BIP34Hash = uint256S("0x327f1b1d976d222269e6b7486c8ffc040e9019fd5d75d481740ecb777c1d7866");
265-
consensus.BIP65Height = 0;
266-
consensus.BIP66Height = 0;
277+
consensus.BIP65Height = 1;
278+
consensus.BIP66Height = 1;
267279
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
268-
consensus.nPowTargetTimespan = 24 * 60 * 60;
280+
consensus.nPowTargetTimespan = 60 * 60;
269281
consensus.nPowTargetSpacing = 60;
270282
consensus.nZawyLwmaAveragingWindow = 90;
271283
consensus.fPowAllowMinDifficultyBlocks = true;
@@ -292,7 +304,7 @@ class CRegTestParams : public CChainParams {
292304
pchMessageStart[1] = 0xce;
293305
pchMessageStart[2] = 0xba;
294306
pchMessageStart[3] = 0xbe;
295-
nDefaultPort = 39706;
307+
nDefaultPort = 18444;
296308
nPruneAfterHeight = 1000;
297309

298310
genesis = CreateGenesisBlock(1619971818, 1, 0x207fffff, 1, 50 * COIN);

src/qt/bitcoingui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
823823
tooltip = tr("Processed %n block(s) of transaction history.", "", count);
824824

825825
// Set icon state: spinning if catching up, tick otherwise
826-
if(secs < 90*60)
826+
if(secs < 60*12)
827827
{
828828
tooltip = tr("Up to date") + QString(".<br>") + tooltip;
829829
labelBlocksIcon->setPixmap(platformStyle->SingleColorIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));

src/timedata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <stdint.h>
1111
#include <vector>
1212

13-
static const int64_t DEFAULT_MAX_TIME_ADJUSTMENT = 70 * 60;
13+
static const int64_t DEFAULT_MAX_TIME_ADJUSTMENT = 50 * 3; // ~MAX_FUTURE_BLOCK_TIME / 2
1414

1515
class CNetAddr;
1616

src/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* network protocol versioning
1010
*/
1111

12-
static const int PROTOCOL_VERSION = 70019;
12+
static const int PROTOCOL_VERSION = 70020;
1313

1414
//! initial proto version, to be increased after version/verack negotiation
1515
static const int INIT_PROTO_VERSION = 209;
@@ -18,7 +18,7 @@ static const int INIT_PROTO_VERSION = 209;
1818
static const int GETHEADERS_VERSION = 31800;
1919

2020
//! disconnect from peers older than this proto version
21-
static const int MIN_PEER_PROTO_VERSION = PROTOCOL_VERSION;
21+
static const int MIN_PEER_PROTO_VERSION = GETHEADERS_VERSION;
2222

2323
//! nTime field added to CAddress, starting with this version;
2424
//! if possible, avoid requesting addresses nodes older than this

0 commit comments

Comments
 (0)