-
-
Save wakiyamap/18e175ef270eb66000527fc38887ab81 to your computer and use it in GitHub Desktop.
450000block付近のデータを調べるようにソースを変更したdiff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff | |
diff --git a/src/chainparams.cpp b/src/chainparams.cpp | |
index 73a869a6b..85ae09139 100644 | |
--- a/src/chainparams.cpp | |
+++ b/src/chainparams.cpp | |
@@ -152,9 +152,6 @@ public: | |
{ 189250, uint256S("0x1bea3d5c25a8097eef2e70ece4beb6c502b895fe00056552948309beb3497c99") }, | |
{ 300000, uint256S("0x11095515590421444ba29396d9122c234baced79be8b32604acc37cf094558ab") }, | |
{ 444000, uint256S("0x3ed05516cdce4db93b135189592c7e2b37d768f99a1819a1d2ea3a8e5b8439a8") }, | |
- { 904000, uint256S("0x353f5b7f9440e1d830bd1c265c69fb0e7c7988e343b2202a704406d04a8cd02e") }, | |
- { 1377000, uint256S("0x8ee1fd0a836d804422a100fb5c1ca7626c7a35b492c234146797f4a50f38eea8") }, | |
- { 1639000, uint256S("0x99274770cb96287f9f105f6dd5512795ee87ec68ddd06699f90c0d574a07aa4c") }, | |
} | |
}; | |
diff --git a/src/pow.cpp b/src/pow.cpp | |
index 515db21d8..6e215b702 100644 | |
--- a/src/pow.cpp | |
+++ b/src/pow.cpp | |
@@ -279,6 +279,9 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits, const Consensus::Params& | |
bnTarget.SetCompact(nBits, &fNegative, &fOverflow); | |
+ LogPrintf("%d\n",bnTarget.ToString()); | |
+ LogPrintf("%d\n",UintToArith256(hash).ToString()); | |
+ LogPrintf("%d\n",UintToArith256(params.powLimit).ToString()); | |
// Check range | |
if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit)) | |
return false; | |
diff --git a/src/validation.cpp b/src/validation.cpp | |
index ece0548bf..ee330a47e 100644 | |
--- a/src/validation.cpp | |
+++ b/src/validation.cpp | |
@@ -3265,6 +3265,7 @@ static bool CheckBlockHeader(const CBlockHeader& block, BlockValidationState& st | |
} | |
// Check proof of work matches claimed amount | |
+ LogPrintf("%d\n",nHeight); | |
if (fCheckPOW && !CheckProofOfWork(block.GetPoWHash(nHeight >= Params().SwitchLyra2REv2_DGWblock()), block.nBits, consensusParams)) | |
return state.Invalid(BlockValidationResult::BLOCK_INVALID_HEADER, "high-hash", "proof of work failed"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment