From 78ba621fa3501f0b22dd6d98e6bb364fdaf15207 Mon Sep 17 00:00:00 2001 From: wowario Date: Thu, 17 Jun 2021 09:36:40 +0300 Subject: [PATCH] nudge estimate height --- README.md | 2 +- src/hardforks/hardforks.cpp | 4 ++-- src/wallet/wallet2.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9fb2c476f..7b7c9afa1 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Dates are provided in the format YYYY-MM-DD. | 160,777 | 2019-11-20 | Gaping Goatse | v0.7.0.0 | v0.7.1.0 | Only allow >= 2 outputs, change to the block median used to calculate penalty, rct sigs in coinbase forbidden, 4 unlock time as protocol rule | - | 2020-06-28 | Hallucinogenic Hypnotoad | v0.8.0.0 | v0.8.0.2 | Dandelion++ support | 253,999 | 2020-10-09 | Illiterate Illuminati | v0.9.0.0 | v0.9.3.3 | Dynamic coinbase unlock (up to 1 mo.), Deterministic unlock times, Enforce maximum coinbase amount, show_qr_code wallet command, CLSAG -| 331,571 | 2021-07-04 | Junkie Jeff | v0.10.0.0 | v0.10.0.0 | Bulletproofs+, Miner Block Header Signing, Change coinbase unlock time to 1 day, Reset difficulty and switch back to Monero's difficulty algorithm +| 331,337 | 2021-07-04 | Junkie Jeff | v0.10.0.0 | v0.10.0.0 | Bulletproofs+, Miner Block Header Signing, Change coinbase unlock time to 1 day, Reset difficulty and switch back to Monero's difficulty algorithm X's indicate that these details have not been determined as of commit date. diff --git a/src/hardforks/hardforks.cpp b/src/hardforks/hardforks.cpp index 994a9a55f..2f13f984e 100644 --- a/src/hardforks/hardforks.cpp +++ b/src/hardforks/hardforks.cpp @@ -43,8 +43,8 @@ const hardfork_t mainnet_hard_forks[] = { { 15, 160777, 0, 1573280497 }, { 16, 253999, 0, 1600576508 }, { 17, 254287, 0, 1600576524 }, - { 18, 331571, 0, 1623245591 }, - { 19, 331859, 0, 1623693101 }, + { 18, 331337, 0, 1623245591 }, + { 19, 331625, 0, 1623693101 }, }; const size_t num_mainnet_hard_forks = sizeof(mainnet_hard_forks) / sizeof(mainnet_hard_forks[0]); diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 285928a79..3b08d72dc 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -8282,7 +8282,7 @@ void wallet2::get_outs(std::vector> const uint64_t amount = td.is_rct() ? 0 : td.amount(); std::unordered_set seen_indices; // request more for rct in base recent (locked) coinbases are picked, since they're locked for longer - uint64_t approx_blockchain_height = m_nettype == TESTNET ? 0 : (time(NULL) - 1522624244)/313; + uint64_t approx_blockchain_height = m_nettype == TESTNET ? 0 : (time(NULL) - 1522624244)/311; uint64_t unlock_height = td.m_block_height + std::max(CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE, CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS); if (td.m_tx.unlock_time < CRYPTONOTE_MAX_BLOCK_NUMBER && td.m_tx.unlock_time > unlock_height) unlock_height = td.m_tx.unlock_time; @@ -8603,7 +8603,7 @@ void wallet2::get_outs(std::vector> for(size_t idx: selected_transfers) { const transfer_details &td = m_transfers[idx]; - uint64_t approx_blockchain_height = m_nettype == TESTNET ? 0 : (time(NULL) - 1522624244)/313; + uint64_t approx_blockchain_height = m_nettype == TESTNET ? 0 : (time(NULL) - 1522624244)/311; uint64_t unlock_height = td.m_block_height + std::max(CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE, CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS); if (td.m_tx.unlock_time < CRYPTONOTE_MAX_BLOCK_NUMBER && td.m_tx.unlock_time > unlock_height) unlock_height = td.m_tx.unlock_time; @@ -12222,7 +12222,7 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err) uint64_t wallet2::get_approximate_blockchain_height() const { - uint64_t approx_blockchain_height = m_nettype == TESTNET ? 0 : (time(NULL) - 1522624244)/313; + uint64_t approx_blockchain_height = m_nettype == TESTNET ? 0 : (time(NULL) - 1522624244)/311; LOG_PRINT_L2("Calculated blockchain height: " << approx_blockchain_height); return approx_blockchain_height; }