Skip to content

Commit

Permalink
Merge branch 'fixes-v1.2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ander7agar committed Dec 12, 2017
2 parents abce06e + cdb78e5 commit 902327a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/chainparams.cpp
Expand Up @@ -125,7 +125,8 @@ class CMainParams : public CChainParams {

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,28);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
//base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,50);
base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,35);

base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,176);
base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();
Expand Down Expand Up @@ -207,6 +208,7 @@ class CTestNetParams : public CChainParams {

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,87);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,35);

base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,239);
base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();
Expand Down Expand Up @@ -287,6 +289,7 @@ class CRegTestParams : public CChainParams {

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,35);

base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,239);
base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();
Expand Down
15 changes: 10 additions & 5 deletions src/validation.cpp
Expand Up @@ -1223,21 +1223,26 @@ bool IsInitialBlockDownload()
return false;

LOCK(cs_main);
if (latchToFalse.load(std::memory_order_relaxed))
if (latchToFalse.load(std::memory_order_relaxed)) {
error("IsInitialBlockDownload: latchToFalse, false");
return false;
if (fImporting || fReindex)
}
if (fImporting || fReindex) {
error("IsInitialBlockDownload: fImporting || fReindex, true");
return true;
if (chainActive.Tip() == NULL)
}
if (chainActive.Tip() == NULL) {
error("IsInitialBlockDownload: chainActive.Tip() == NULL, true");
return true;
if (chainActive.Tip()->nChainWork < UintToArith256(chainParams.GetConsensus().nMinimumChainWork))
}
if (chainActive.Tip()->nChainWork < UintToArith256(chainParams.GetConsensus().nMinimumChainWork)) {
error("IsInitialBlockDownload: nChainWork < nMinimumChainWork, true");
return true;
if (chainActive.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge))
}
if (chainActive.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge)) {
error("IsInitialBlockDownload: GetBlockTime() < (GetTime() - nMaxTipAge), true");
return true;
}
latchToFalse.store(true, std::memory_order_relaxed);
return false;
}
Expand Down

0 comments on commit 902327a

Please sign in to comment.