From ccc2396d9222574cafe9a5884a2078748d8052dd Mon Sep 17 00:00:00 2001 From: wowario Date: Sun, 12 Feb 2023 12:45:02 +0300 Subject: [PATCH] remove testnet/stagenet fork heights/blocks --- src/blocks/CMakeLists.txt | 2 +- src/blocks/blocks.cpp | 8 +------ src/blocks/stagenet_blocks.dat | 0 src/blocks/testnet_blocks.dat | 0 src/hardforks/hardforks.cpp | 43 +--------------------------------- 5 files changed, 3 insertions(+), 50 deletions(-) delete mode 100644 src/blocks/stagenet_blocks.dat delete mode 100644 src/blocks/testnet_blocks.dat diff --git a/src/blocks/CMakeLists.txt b/src/blocks/CMakeLists.txt index db8fe5f94..bab121617 100644 --- a/src/blocks/CMakeLists.txt +++ b/src/blocks/CMakeLists.txt @@ -41,7 +41,7 @@ const size_t ${BLOB_NAME}_len = sizeof(${BLOB_NAME}); " ) ]=]) -foreach(BLOB_NAME checkpoints testnet_blocks stagenet_blocks) +foreach(BLOB_NAME checkpoints) set(OUTPUT_C_SOURCE "generated_${BLOB_NAME}.c") list(APPEND GENERATED_SOURCES ${OUTPUT_C_SOURCE}) set(INPUT_DAT_FILE "${BLOB_NAME}.dat") diff --git a/src/blocks/blocks.cpp b/src/blocks/blocks.cpp index 0661f8448..62651b810 100644 --- a/src/blocks/blocks.cpp +++ b/src/blocks/blocks.cpp @@ -4,18 +4,12 @@ extern const unsigned char checkpoints[]; extern const size_t checkpoints_len; -extern const unsigned char stagenet_blocks[]; -extern const size_t stagenet_blocks_len; -extern const unsigned char testnet_blocks[]; -extern const size_t testnet_blocks_len; namespace blocks { const std::unordered_map, std::hash> CheckpointsByNetwork = { - {cryptonote::network_type::MAINNET, {checkpoints, checkpoints_len}}, - {cryptonote::network_type::STAGENET, {stagenet_blocks, stagenet_blocks_len}}, - {cryptonote::network_type::TESTNET, {testnet_blocks, testnet_blocks_len}} + {cryptonote::network_type::MAINNET, {checkpoints, checkpoints_len}} }; const epee::span GetCheckpointsData(cryptonote::network_type network) diff --git a/src/blocks/stagenet_blocks.dat b/src/blocks/stagenet_blocks.dat deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/blocks/testnet_blocks.dat b/src/blocks/testnet_blocks.dat deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/hardforks/hardforks.cpp b/src/hardforks/hardforks.cpp index a3218f9c0..4dd889597 100644 --- a/src/hardforks/hardforks.cpp +++ b/src/hardforks/hardforks.cpp @@ -51,51 +51,10 @@ const size_t num_mainnet_hard_forks = sizeof(mainnet_hard_forks) / sizeof(mainne const uint64_t mainnet_hard_fork_version_1_till = 0; const hardfork_t testnet_hard_forks[] = { - // version 1 from the start of the blockchain - { 1, 1, 0, 1341378000 }, - - // version 2 starts from block 624634, which is on or around the 23rd of November, 2015. Fork time finalised on 2015-11-20. No fork voting occurs for the v2 fork. - { 2, 624634, 0, 1445355000 }, - - // versions 3-5 were passed in rapid succession from September 18th, 2016 - { 3, 800500, 0, 1472415034 }, - { 4, 801219, 0, 1472415035 }, - { 5, 802660, 0, 1472415036 + 86400*180 }, // add 5 months on testnet to shut the update warning up since there's a large gap to v6 - - { 6, 971400, 0, 1501709789 }, - { 7, 1057027, 0, 1512211236 }, - { 8, 1057058, 0, 1533211200 }, - { 9, 1057778, 0, 1533297600 }, - { 10, 1154318, 0, 1550153694 }, - { 11, 1155038, 0, 1550225678 }, - { 12, 1308737, 0, 1569582000 }, - { 13, 1543939, 0, 1599069376 }, - { 14, 1544659, 0, 1599069377 }, - { 15, 1982800, 0, 1652727000 }, - { 16, 1983520, 0, 1652813400 }, }; const size_t num_testnet_hard_forks = sizeof(testnet_hard_forks) / sizeof(testnet_hard_forks[0]); -const uint64_t testnet_hard_fork_version_1_till = 624633; +const uint64_t testnet_hard_fork_version_1_till = 0; const hardfork_t stagenet_hard_forks[] = { - // version 1 from the start of the blockchain - { 1, 1, 0, 1341378000 }, - - // versions 2-7 in rapid succession from March 13th, 2018 - { 2, 32000, 0, 1521000000 }, - { 3, 33000, 0, 1521120000 }, - { 4, 34000, 0, 1521240000 }, - { 5, 35000, 0, 1521360000 }, - { 6, 36000, 0, 1521480000 }, - { 7, 37000, 0, 1521600000 }, - { 8, 176456, 0, 1537821770 }, - { 9, 177176, 0, 1537821771 }, - { 10, 269000, 0, 1550153694 }, - { 11, 269720, 0, 1550225678 }, - { 12, 454721, 0, 1571419280 }, - { 13, 675405, 0, 1598180817 }, - { 14, 676125, 0, 1598180818 }, - { 15, 1151000, 0, 1656629117 }, - { 16, 1151720, 0, 1656629118 }, }; const size_t num_stagenet_hard_forks = sizeof(stagenet_hard_forks) / sizeof(stagenet_hard_forks[0]);