public void addWalletToPeerGroup(Wallet wallet, boolean useFastCatchup) { if (peerGroup != null && wallet != null) { log.trace("Adding wallet {} to peerGroup {}", wallet, peerGroup); peerGroup.addWallet(wallet); if (useFastCatchup) { peerGroup.setFastCatchupTimeSecs(wallet.getEarliestKeyCreationTime()); } else { peerGroup.setFastCatchupTimeSecs(0); // Download full blocks always } recalculateFastCatchupAndFilter(false); } else { log.debug("Could not add wallet to peerGroup - one or more is missing"); } }
bitcoinPeerGroup.setFastCatchupTimeSecs(fastCatchUpInstant.getEpochSecond()); });
setFastCatchupTimeSecs(result.earliestKeyTimeSecs); synchronized (inFlightRecalculations) { inFlightRecalculations.put(mode, null);
setFastCatchupTimeSecs(result.earliestKeyTimeSecs); synchronized (inFlightRecalculations) { inFlightRecalculations.put(mode, null);
setFastCatchupTimeSecs(result.earliestKeyTimeSecs); synchronized (inFlightRecalculations) { inFlightRecalculations.put(mode, null);
setFastCatchupTimeSecs(result.earliestKeyTimeSecs); synchronized (inFlightRecalculations) { inFlightRecalculations.put(mode, null);
peerGroup.addPeerDiscovery(new DnsDiscovery(PARAMS)); long now = new Date().getTime() / 1000; peerGroup.setFastCatchupTimeSecs(now);
public void init () { synchronized (initialized) { if (!initialized) { try { blockStore = new SPVBlockStore(Constants.getNetwork(), new File("blockheaders")); } catch (Exception e) { blockStore = new MemoryBlockStore(Constants.getNetwork()); } try { blockChain = new BlockChain(Constants.getNetwork(), blockStore); peerGroup = new PeerGroup(Constants.getNetwork(), blockChain); peerGroup.addPeerDiscovery(new DnsDiscovery(Constants.getNetwork())); peerGroup.setDownloadTxDependencies(false); peerGroup.setBloomFilteringEnabled(false); peerGroup.setFastCatchupTimeSecs(System.currentTimeMillis()); peerGroup.start(); peerGroup.addEventListener(new EventListener(), Threading.SAME_THREAD); registerShutdownHook(); final DownloadProgressTracker listener = new DownloadProgressTracker(); peerGroup.startBlockChainDownload(listener); } catch (Exception e) { throw new RuntimeException(e); } initialized = true; } } }
peerGroup.addAddress(InetAddress.getByName("188.226.228.88")); long now = new Date().getTime() / 1000; peerGroup.setFastCatchupTimeSecs(now);