fix outdated checks

fix_outdated_checks
wow nero 1 year ago
parent e921c3b8a3
commit 934ade9183
No known key found for this signature in database
GPG Key ID: 4386E69AF260078D

@ -5855,11 +5855,12 @@ bool wallet2::check_hard_fork_version(cryptonote::network_type nettype, const st
// First check if wallet or daemon is outdated (whether either are unaware of
// a hard fork). Then check if fork has passed rendering versions incompatible
if (daemon_hard_forks.size() > 0)
{
// Block 0 in Wownero starts from version 7
bool daemon_outdated = daemon_hard_forks.size() + 6 < wallet_num_hard_forks;
bool wallet_outdated = daemon_hard_forks.size() + 6 > wallet_num_hard_forks;
bool daemon_outdated = daemon_hard_forks.size() < wallet_num_hard_forks;
bool wallet_outdated = daemon_hard_forks.size() > wallet_num_hard_forks;
if (daemon_is_outdated)
*daemon_is_outdated = daemon_outdated;
@ -5868,7 +5869,7 @@ bool wallet2::check_hard_fork_version(cryptonote::network_type nettype, const st
if (daemon_outdated)
{
uint64_t daemon_missed_fork_height = wallet_hard_forks[daemon_hard_forks.size() + 6].height;
uint64_t daemon_missed_fork_height = wallet_hard_forks[daemon_hard_forks.size()].height;
// If the daemon missed the fork, then technically it is no longer part of
// the Monero network. Don't connect.

Loading…
Cancel
Save