Skip to content

Commit

Permalink
New genesis block, header key, version 46.02
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptAxe committed Dec 29, 2023
1 parent 81ee2f5 commit 47c40a5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 46)
define(_CLIENT_VERSION_REVISION, 01)
define(_CLIENT_VERSION_REVISION, 02)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2023)
Expand Down
13 changes: 7 additions & 6 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class CMainParams : public CChainParams {
consensus.nMinimumChainWork = uint256S("0x00");

// By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("0x3722a1ebb37cbc2430f4fa18ba6ecedf3aa5047385cc9dd79f0c78429b729b08");
consensus.defaultAssumeValid = uint256S("0xda8cf4b929af5f6d24561fc1357b562813f705d2c73c337cd4667e5a3297b8b3");

consensus.MinimumHeight = 37178;

Expand All @@ -112,10 +112,11 @@ class CMainParams : public CChainParams {
nDefaultPort = 8333;
nPruneAfterHeight = 100000;

genesis = CreateGenesisBlock(1702443889, 2, 0x207fffff, 1, 50 * COIN);
genesis = CreateGenesisBlock(1703872240, 3, 0x207fffff, 1, 50 * COIN);

consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x604fd11b9e5e5013f09eb5c764d2174c5ad0e339b9e027e6a98a55cacd65eae0"));

assert(consensus.hashGenesisBlock == uint256S("0x74b3caf4709e53c488ab8f6324c1fd72ffcfba96193401a2b33c0f6b6bffcf7c"));
assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));

base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
Expand All @@ -136,13 +137,13 @@ class CMainParams : public CChainParams {

checkpointData = {
{
{37178, uint256S("3722a1ebb37cbc2430f4fa18ba6ecedf3aa5047385cc9dd79f0c78429b729b08")},
// {37178, uint256S("3722a1ebb37cbc2430f4fa18ba6ecedf3aa5047385cc9dd79f0c78429b729b08")},
}
};

chainTxData = ChainTxData{
/* nTime */ 1703295430,
/* nTxCount */ 37178,
/* nTime */ 1703872240,
/* nTxCount */ 1,
/* dTxRate */ 1
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6181,7 +6181,7 @@ bool VerifyHeaderSig(const CBlockHeader& header)
return false;
}

if (DecodeDestination("145Ci4nDFymr3oXRsE5KCmeUdd6VuUxEB4") != CTxDestination(pubkey.GetID())) {
if (DecodeDestination(HEADER_SIG_ADDR) != CTxDestination(pubkey.GetID())) {
LogPrintf("%s: Address does not match signature!\n", __func__);
return false;
}
Expand Down
2 changes: 2 additions & 0 deletions src/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ static const int DEFAULT_STOPATHEIGHT = 0;
/** Maximum number of bytes added to a critical transaction (v3 - BMM etc) */
static const int MAX_CRITICAL_DATA_BYTES = 21;

static const std::string HEADER_SIG_ADDR = "1PN7Y9UeDx7XZNdVcj83iP4u2QbUhGeVMj";

struct BlockHasher
{
size_t operator()(const uint256& hash) const { return hash.GetCheapHash(); }
Expand Down
4 changes: 1 addition & 3 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4988,9 +4988,7 @@ std::vector<unsigned char> CWallet::SignHeaderHash(const uint256& hash)

LOCK(vpwallets[0]->cs_wallet);

std::string strAddress = "145Ci4nDFymr3oXRsE5KCmeUdd6VuUxEB4";

CTxDestination dest = DecodeDestination(strAddress);
CTxDestination dest = DecodeDestination(HEADER_SIG_ADDR);
if (!IsValidDestination(dest))
return std::vector<unsigned char> {};

Expand Down

0 comments on commit 47c40a5

Please sign in to comment.