@Test public void testIsSyncedSyncing() throws Exception { configureSyncing(true); assertFalse(ensResolver.isSynced()); }
boolean isSynced() throws Exception { PlatonSyncing ethSyncing = web3j.platonSyncing().send(); if (ethSyncing.isSyncing()) { return false; } else { PlatonBlock ethBlock = web3j.platonGetBlockByNumber(DefaultBlockParameterName.LATEST, false).send(); long timestamp = ethBlock.getBlock().getTimestamp().longValue() * 1000; return System.currentTimeMillis() - syncThreshold < timestamp; } }
EnsResolver { boolean isSynced() throws Exception { PlatonSyncing ethSyncing = web3j.platonSyncing().send(); if (ethSyncing.isSyncing()) { return false; } else { PlatonBlock ethBlock = web3j.platonGetBlockByNumber(DefaultBlockParameterName.LATEST, false).send(); long timestamp = ethBlock.getBlock().getTimestamp().longValue() * 1000; return System.currentTimeMillis() - syncThreshold < timestamp; } } }
EnsResolver { boolean isSynced() throws Exception { PlatonSyncing ethSyncing = web3j.platonSyncing().send(); if (ethSyncing.isSyncing()) { return false; } else { PlatonBlock ethBlock = web3j.platonGetBlockByNumber(DefaultBlockParameterName.LATEST, false).send(); long timestamp = ethBlock.getBlock().getTimestamp().longValue() * 1000; return System.currentTimeMillis() - syncThreshold < timestamp; } } EnsResolver(Web3j web3j, long syncThreshold);  EnsResolver(Web3j web3j); }
EnsResolver { boolean isSynced() throws Exception { PlatonSyncing ethSyncing = web3j.platonSyncing().send(); if (ethSyncing.isSyncing()) { return false; } else { PlatonBlock ethBlock = web3j.platonGetBlockByNumber(DefaultBlockParameterName.LATEST, false).send(); long timestamp = ethBlock.getBlock().getTimestamp().longValue() * 1000; return System.currentTimeMillis() - syncThreshold < timestamp; } } EnsResolver(Web3j web3j, long syncThreshold);  EnsResolver(Web3j web3j); void setSyncThreshold(long syncThreshold); long getSyncThreshold(); PublicResolver obtainPublicResolver(String ensName); String resolve(String contractId); String reverseResolve(String address); static boolean isValidEnsName(String input); }
EnsResolver { boolean isSynced() throws Exception { PlatonSyncing ethSyncing = web3j.platonSyncing().send(); if (ethSyncing.isSyncing()) { return false; } else { PlatonBlock ethBlock = web3j.platonGetBlockByNumber(DefaultBlockParameterName.LATEST, false).send(); long timestamp = ethBlock.getBlock().getTimestamp().longValue() * 1000; return System.currentTimeMillis() - syncThreshold < timestamp; } } EnsResolver(Web3j web3j, long syncThreshold);  EnsResolver(Web3j web3j); void setSyncThreshold(long syncThreshold); long getSyncThreshold(); PublicResolver obtainPublicResolver(String ensName); String resolve(String contractId); String reverseResolve(String address); static boolean isValidEnsName(String input);  }