fix an edge case of incorrect target_height in early syncing

This commit is contained in:
fuwa
2019-06-25 17:37:00 +08:00
parent 0dcf63493c
commit e099dbc72e
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -26,3 +26,4 @@ const config = cryptoConfig.config;
const arch = 'arm64';
// const arch = 'x86_64';
const minimumHeight = 10000;
+2 -1
View File
@@ -147,8 +147,9 @@ class SyncingState extends HookedState {
print(line);
final _targetHeight = await rpc.targetHeight();
final _height = await rpc.height();
if (_targetHeight == 0) break;
if (_targetHeight == 0 && _height > minimumHeight) break;
}