Skip to content

Commit

Permalink
Fix crash when starting blockchain service on new wallet (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
desamtralized authored Mar 15, 2020
1 parent 9a40f1b commit ccad8bb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public class BlockchainStateUtils {

@Nullable
public static String getSyncStateString(BlockchainState blockchainState, Context context) {
if (blockchainState == null || blockchainState.getBestChainDate() == null) {
return null;
}

final long blockchainLag = System.currentTimeMillis() - blockchainState.getBestChainDate().getTime();
final boolean blockchainUptodate = blockchainLag < BLOCKCHAIN_UPTODATE_THRESHOLD_MS;
final boolean noImpediments = blockchainState.getImpediments().isEmpty();
Expand Down

0 comments on commit ccad8bb

Please sign in to comment.