@@ -33,79 +33,26 @@ uint256 CBlockHeader::GetPoWHash() const
3333 uint256 powHash = uint256S (" ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" );
3434
3535 // BitCore
36-
37- if (GetBlockTime () >= 1493124696 ) // Human time (GMT): Tue, 25 Apr 2017 12:51:36 GMT
38- {
36+ if (GetBlockTime () >= HASH_FORK_TIME_1) // Wednesday, 23. October 2019 12:02:26
37+ {
38+ return Mega_Btx (BEGIN (nVersion), END (nNonce), GetBlockTime ());
39+ }
40+ else
41+ {
42+ if (GetBlockTime () >= 1493124696 ) // Human time (GMT): Tue, 25 Apr 2017 12:51:36 GMT
43+ {
3944 return HashTimeTravel (BEGIN (nVersion), END (nNonce), GetBlockTime ()); // BitCore TimeTravel
40- }
41- else
42- {
45+ }
46+ else
47+ {
4348
4449 scrypt_1024_1_1_256 (BEGIN (nVersion), BEGIN (powHash)); // BitCore Scrypt
4550 return powHash;
46- }
47- return powHash;
48-
49- // Brainstormingpart
50- /*
51- switch (nVersion & ALGO_VERSION_MASK)
52- {
53- case ALGO_SHA256D: powHash = GetHash(); break;
54- case ALGO_SCRYPT: scrypt_1024_1_1_256(BEGIN(nVersion), BEGIN(powHash)); break;
55- case ALGO_NIST5: powHash = NIST5(BEGIN(nVersion), END(nNonce)); break;
56- case ALGO_LYRA2Z: lyra2z_hash(BEGIN(nVersion), BEGIN(powHash)); break;
57- case ALGO_X11: powHash = HashX11(BEGIN(nVersion), END(nNonce)); break;
58- case ALGO_X16R: powHash = HashX16R(BEGIN(nVersion), END(nNonce), hashPrevBlock); break;
59- default: break; // FXTC TODO: we should not be here
51+ }
6052 }
61-
6253 return powHash;
63- */
64- /*
65- // Megacoin
66-
67- if(GetBlockTime() >= 1493124696) { //Human time (GMT): Tue, 25 Apr 2017 12:51:36 GMT
68- return HashTimeTravel(BEGIN(nVersion), END(nNonce), GetBlockTime()); // MegaCoin TimeTravel
69- }
70- else
71- {
72-
73- uint256 thash;
74- // please check also pow.cpp:L414
75- //10/21/2019 @ 12:00am (UTC)
76- if(GetBlockTime() >= HASH_FORK_TIME_1) //Wednesday, 23. October 2019 12:02:26
77- {
78- //thash = HashX16R(BEGIN(nVersion), END(nNonce), hashPrevBlock);
79- scrypt_1024_1_1_256(BEGIN(nVersion), BEGIN(thash));
80- } //10/21/2019 @ 12:00am (UTC)
81- else
82- {
83- scrypt_1024_1_1_256(BEGIN(nVersion), BEGIN(thash));
84- return thash;
85- }
86- return thash;
87- */
8854}
8955
90-
91- /*
92- unsigned int CBlockHeader::GetAlgoEfficiency(int nBlockHeight) const
93- {
94- switch (nVersion & ALGO_VERSION_MASK)
95- {
96- case ALGO_SHA256D: return 1;
97- case ALGO_SCRYPT: return 13747;
98- case ALGO_NIST5: return 2631;
99- case ALGO_LYRA2Z: return 2014035;
100- case ALGO_X11: return 477;
101- case ALGO_X16R: return 263100;
102- default: return 1; // FXTC TODO: we should not be here
103- }
104-
105- return 1; // FXTC TODO: we should not be here
106- }
107- */
108-
10956std::string CBlock::ToString () const
11057{
11158 std::stringstream s;
0 commit comments