Fix reorg loop when anchor offset = 0
This commit is contained in:
parent
8ad5191878
commit
b8f1f10661
|
@ -783,7 +783,8 @@ abstract class _SyncStatus with Store {
|
|||
Future<void> reorg() async {
|
||||
final _syncedHeight = await getDbSyncedHeight();
|
||||
if (_syncedHeight != null) {
|
||||
final rewindHeight = max(_syncedHeight.height - settings.anchorOffset, 0);
|
||||
final offset = max(settings.anchorOffset, 1);
|
||||
final rewindHeight = max(_syncedHeight.height - offset, 0);
|
||||
final height = WarpApi.rewindTo(rewindHeight);
|
||||
showSnackBar(S.current.blockReorgDetectedRewind(height));
|
||||
syncStatus.reset();
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 152fe56a1e0d47bf86d2ec4b9c953dd294e0787a
|
||||
Subproject commit 92e3e17e66f266b1137181dd26fe3fc19700e3f2
|
Loading…
Reference in New Issue