mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 08:17:37 +00:00
Fix for miners on reorg
Make sure dataset gets re-init'd if a reorg changes the epoch
This commit is contained in:
parent
2675cf4483
commit
f54301dd75
1 changed files with 4 additions and 1 deletions
|
@ -161,8 +161,11 @@ void rx_reorg(const uint64_t split_height) {
|
||||||
int i;
|
int i;
|
||||||
CTHR_MUTEX_LOCK(rx_mutex);
|
CTHR_MUTEX_LOCK(rx_mutex);
|
||||||
for (i=0; i<2; i++) {
|
for (i=0; i<2; i++) {
|
||||||
if (split_height < rx_s[i].rs_height)
|
if (split_height <= rx_s[i].rs_height) {
|
||||||
|
if (rx_s[i].rs_height == rx_dataset_height)
|
||||||
|
rx_dataset_height = 1;
|
||||||
rx_s[i].rs_height = 1; /* set to an invalid seed height */
|
rx_s[i].rs_height = 1; /* set to an invalid seed height */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CTHR_MUTEX_UNLOCK(rx_mutex);
|
CTHR_MUTEX_UNLOCK(rx_mutex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue