@Test void shouldNotBackfillMultipleTimes() { final UInt64 blockNumber = UInt64.valueOf(100); withBlocks( block( blockNumber.intValue(), timeProvider.getTimeInSeconds().minus(CACHE_DURATION).minus(ONE))); blockFetcher.onInSync(blockNumber); verify(eth1Provider).getGuaranteedEth1Block(blockNumber); blockFetcher.onInSync(blockNumber); verify(eth1Provider).getGuaranteedEth1Block(blockNumber); verifyNoMoreInteractions(eth1Provider); }
public synchronized void onInSync(final UInt64 latestCanonicalBlockNumber) { if (active) { return; } active = true; LOG.debug("Beginning back-fill of Eth1 blocks"); backfillEth1Blocks(latestCanonicalBlockNumber); }
Eth1BlockFetcher { public synchronized void onInSync(final UInt64 latestCanonicalBlockNumber) { if (active) { return; } active = true; LOG.debug("Beginning back-fill of Eth1 blocks"); backfillEth1Blocks(latestCanonicalBlockNumber); } }
Eth1BlockFetcher { public synchronized void onInSync(final UInt64 latestCanonicalBlockNumber) { if (active) { return; } active = true; LOG.debug("Beginning back-fill of Eth1 blocks"); backfillEth1Blocks(latestCanonicalBlockNumber); } Eth1BlockFetcher(
      final Eth1EventsChannel eth1EventsChannel,
      final Eth1Provider eth1Provider,
      final TimeProvider timeProvider,
      final UInt64 cacheDuration); }
Eth1BlockFetcher { public synchronized void onInSync(final UInt64 latestCanonicalBlockNumber) { if (active) { return; } active = true; LOG.debug("Beginning back-fill of Eth1 blocks"); backfillEth1Blocks(latestCanonicalBlockNumber); } Eth1BlockFetcher(
      final Eth1EventsChannel eth1EventsChannel,
      final Eth1Provider eth1Provider,
      final TimeProvider timeProvider,
      final UInt64 cacheDuration); synchronized void onInSync(final UInt64 latestCanonicalBlockNumber); void fetch(final BigInteger fromBlock, final BigInteger toBlock); }
Eth1BlockFetcher { public synchronized void onInSync(final UInt64 latestCanonicalBlockNumber) { if (active) { return; } active = true; LOG.debug("Beginning back-fill of Eth1 blocks"); backfillEth1Blocks(latestCanonicalBlockNumber); } Eth1BlockFetcher(
      final Eth1EventsChannel eth1EventsChannel,
      final Eth1Provider eth1Provider,
      final TimeProvider timeProvider,
      final UInt64 cacheDuration); synchronized void onInSync(final UInt64 latestCanonicalBlockNumber); void fetch(final BigInteger fromBlock, final BigInteger toBlock);  }