From ff7f0c266e15255619535937702902bc21052169 Mon Sep 17 00:00:00 2001 From: fuwa Date: Tue, 25 Jun 2019 22:39:47 +0800 Subject: [PATCH] update minimumHeight --- cyberwow/lib/config.dart | 2 +- cyberwow/lib/state.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cyberwow/lib/config.dart b/cyberwow/lib/config.dart index d8cd174..32adf5c 100644 --- a/cyberwow/lib/config.dart +++ b/cyberwow/lib/config.dart @@ -26,4 +26,4 @@ const config = cryptoConfig.config; const arch = 'arm64'; // const arch = 'x86_64'; -const minimumHeight = 10000; +const minimumHeight = 118361; diff --git a/cyberwow/lib/state.dart b/cyberwow/lib/state.dart index 8282c04..0dcb660 100644 --- a/cyberwow/lib/state.dart +++ b/cyberwow/lib/state.dart @@ -150,7 +150,7 @@ class SyncingState extends HookedState { print(line); final _targetHeight = await rpc.targetHeight(); - // final _height = await rpc.height(); + final _height = await rpc.height(); // print('syncing: target height ${_targetHeight}'); // print('syncing: height ${_height}'); @@ -158,7 +158,7 @@ class SyncingState extends HookedState { // print('syncing: offline ${_offline}'); final bool initState = line.contains('Initializing core'); print('is init state'); - if (_targetHeight == 0 && (!initState)) break; + if (_targetHeight == 0 && (!initState) && _height > minimumHeight) break; }