From d0d1a14a05cb9b3bf7efbdb7a8bcf7004f296ed3 Mon Sep 17 00:00:00 2001 From: wowario <38101080+wowario@users.noreply.github.com> Date: Tue, 3 Jul 2018 15:43:17 +0300 Subject: [PATCH 1/3] Add stagenet fork heights --- src/cryptonote_core/blockchain.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 6a1ab4324..661bec03a 100755 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -116,16 +116,8 @@ static const struct { uint8_t threshold; time_t time; } 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 }, + { 7, 1, 0, 1519605000 }, + { 8, 10, 0, 1530621606 }, }; //------------------------------------------------------------------ From ee07408ce1df44bd3124fe64c240735cbde17880 Mon Sep 17 00:00:00 2001 From: wowario <38101080+wowario@users.noreply.github.com> Date: Tue, 3 Jul 2018 16:41:11 +0300 Subject: [PATCH 2/3] Add stagenet ips --- src/p2p/net_node.inl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index dd06f7ee3..ddc3c3271 100755 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -372,13 +372,20 @@ namespace nodetool if (nettype == cryptonote::TESTNET) { full_addrs.insert("206.189.166.14:11180"); full_addrs.insert("104.236.48.55:11180"); - } else { + } + else if (nettype == cryptonote::STAGENET) + { + full_addrs.insert("206.189.166.14:38080"); + full_addrs.insert("104.236.48.55:38080"); + } + else + { full_addrs.insert("66.70.218.230:34567"); full_addrs.insert("34.209.48.213:34567"); full_addrs.insert("159.65.91.59:34567"); full_addrs.insert("138.197.31.246:34567"); - } + return full_addrs; } From d5529245150a364038ba1e6ae46d612ed685e3da Mon Sep 17 00:00:00 2001 From: wowario <38101080+wowario@users.noreply.github.com> Date: Wed, 4 Jul 2018 20:56:58 +0300 Subject: [PATCH 3/3] Update adapt get_approximate_blockchain_height --- src/wallet/wallet2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 15935b270..bb548f0b4 100755 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -9142,9 +9142,9 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err) uint64_t wallet2::get_approximate_blockchain_height() const { // time of v8 fork - const time_t fork_time = m_nettype == TESTNET ? 1529020649 : 1524622167; + const time_t fork_time = m_nettype == TESTNET ? 1530634467 : m_nettype == STAGENET ? 1530635153 : 1524622167; // v8 fork block - const uint64_t fork_block = m_nettype == TESTNET ? 10 : 6969; + const uint64_t fork_block = m_nettype == TESTNET ? 10 : m_nettype == STAGENET ? 10 : 6969; // avg seconds per block const int seconds_per_block = DIFFICULTY_TARGET_V2; // Calculated blockchain height