Skip to content

Commit b68fd55

Browse files
committed
Fix block height refresh estimation
1 parent 58e49fc commit b68fd55

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wallet/wallet2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10152,11 +10152,11 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
1015210152
uint64_t wallet2::get_approximate_blockchain_height() const
1015310153
{
1015410154
// time of v2 fork
10155-
const time_t fork_time = m_nettype == TESTNET ? 1448285909 : m_nettype == STAGENET ? 1520937818 : 1458748658;
10155+
const time_t fork_time = m_nettype == TESTNET ? 1448285909 : m_nettype == STAGENET ? 1520937818 : 1520584977;
1015610156
// v2 fork block
10157-
const uint64_t fork_block = m_nettype == TESTNET ? 624634 : m_nettype == STAGENET ? 32000 : 1009827;
10157+
const uint64_t fork_block = m_nettype == TESTNET ? 624634 : m_nettype == STAGENET ? 32000 : 67500;
1015810158
// avg seconds per block
10159-
const int seconds_per_block = DIFFICULTY_TARGET_V2;
10159+
const int seconds_per_block = DIFFICULTY_TARGET_V5;
1016010160
// Calculated blockchain height
1016110161
uint64_t approx_blockchain_height = fork_block + (time(NULL) - fork_time)/seconds_per_block;
1016210162
// testnet got some huge rollbacks, so the estimation is way off

0 commit comments

Comments
 (0)