Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct bugs found in 4.0.0 #68

Merged
merged 1 commit into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 4)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 1)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2022)
define(_COPYRIGHT_HOLDERS,[The %s developers])
Expand Down
15 changes: 7 additions & 8 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,9 @@ class CMainParams : public CChainParams {
consensus.nFlightPlansActivationTime = 999999999999ULL; // TODO

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000000000002");

consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000002518d7bd53a1feec"); //Block 818787
// By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("0x00000000006cd2496fb78aedbd6524c8b1993589097fb848740e37eeab651682");

consensus.defaultAssumeValid = uint256S("0x0000000247de51f4188fc43316cc5e1f8711cff6210b242d234004aae39163d5"); // Block 818787

// The best chain should have at least this much work.

Expand Down Expand Up @@ -228,7 +226,8 @@ class CMainParams : public CChainParams {
{
{ 0, uint256S("0x000000cdb10fc01df7fba251f2168ef7cd7854b571049db4902c315694461dd0")},
{ 275972, uint256S("0x0000004ac340f01da45c151990567a90a3c65010511ba7a05f3439a83c878efb")},
{ 508245, uint256S("0x00000000006cd2496fb78aedbd6524c8b1993589097fb848740e37eeab651682")}
{ 508245, uint256S("0x00000000006cd2496fb78aedbd6524c8b1993589097fb848740e37eeab651682")},
{ 818787, uint256S("0x0000000247de51f4188fc43316cc5e1f8711cff6210b242d234004aae39163d5")}
}
};

Expand Down Expand Up @@ -275,9 +274,9 @@ class CMainParams : public CChainParams {
nMinReorganizationAge = 60 * 60 * 12; // 12 hours

// TODO: Assets, Messaging, Restricted
// nAssetActivationHeight = 9999999999; // Asset activated block height
// nMessagingActivationBlock = 9999999999; // Messaging activated block height
// nRestrictedActivationBlock = 9999999999; // Restricted activated block height
nAssetActivationHeight = 9999999999; // Asset activated block height
nMessagingActivationBlock = 9999999999; // Messaging activated block height
nRestrictedActivationBlock = 9999999999; // Restricted activated block height

/** AVN End **/
}
Expand Down
4 changes: 3 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1613,10 +1613,12 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
passetsCache->Size());

// Check for changed -disablemessaging state
if (gArgs.GetArg("-disablemessaging", false)) {
// TODO: Change to !AreMessagesDeployed()
if (!bNetwork.fOnTestnet || gArgs.GetArg("-disablemessaging", false)) {
LogPrintf("Messaging is disabled\n");
fMessaging = false;
} else {
fMessaging = true;
LogPrintf("Messaging is enabled\n");
}
}
Expand Down
10 changes: 7 additions & 3 deletions src/txdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ bool CBlockTreeDB::WriteTimestampBlockIndex(const CTimestampBlockIndexKey &block

bool CBlockTreeDB::ReadTimestampBlockIndex(const uint256 &hash, unsigned int &ltimestamp) {

CTimestampBlockIndexValue(lts);
CTimestampBlockIndexValue lts;
if (!Read(std::make_pair(DB_BLOCKHASHINDEX, hash), lts))
return false;

Expand Down Expand Up @@ -502,8 +502,12 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::ConsensusParams& consensu
pindexNew->nStatus = diskindex.nStatus;
pindexNew->nTx = diskindex.nTx;

if (!CheckProofOfWork(pindexNew->GetBlockHeader(), consensusParams))
return error("%s: CheckProofOfWork failed: %s", __func__, pindexNew->ToString());
// Avian: Disable PoW Sanity check while loading block index from disk.
// While it is technically feasible to verify the PoW, doing so takes several minutes as it
// requires recomputing every PoW hash during every wallet startup.
// We opt instead to simply trust the data that is on your local disk.
//if (!CheckProofOfWork(pindexNew->GetBlockHeader(), consensusParams))
// return error("%s: CheckProofOfWork failed: %s", __func__, pindexNew->ToString());

pcursor->Next();
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ CConditionVariable cvBlockChange;
int nScriptCheckThreads = 0;
std::atomic_bool fImporting(false);
std::atomic_bool fReindex(false);
bool fMessaging = true;
bool fMessaging = false;
bool fTxIndex = false;
bool fAssetIndex = false;
bool fAddressIndex = false;
Expand Down