@Test void onPeerStatus_shouldAddNewChainToTrack() { final SlotAndBlockRoot chainHead = dataStructureUtil.randomSlotAndBlockRoot(); targetChains.onPeerStatusUpdated(peer1, chainHead); assertTargetChains(chainWith(chainHead, peer1)); }
public void onPeerStatusUpdated(final SyncSource peer, final SlotAndBlockRoot chainHead) { removePeerFromLastChain(peer); chains.computeIfAbsent(chainHead, TargetChain::new).addPeer(peer); lastPeerTarget.put(peer, chainHead); }
TargetChains { public void onPeerStatusUpdated(final SyncSource peer, final SlotAndBlockRoot chainHead) { removePeerFromLastChain(peer); chains.computeIfAbsent(chainHead, TargetChain::new).addPeer(peer); lastPeerTarget.put(peer, chainHead); } }
TargetChains { public void onPeerStatusUpdated(final SyncSource peer, final SlotAndBlockRoot chainHead) { removePeerFromLastChain(peer); chains.computeIfAbsent(chainHead, TargetChain::new).addPeer(peer); lastPeerTarget.put(peer, chainHead); }  }
TargetChains { public void onPeerStatusUpdated(final SyncSource peer, final SlotAndBlockRoot chainHead) { removePeerFromLastChain(peer); chains.computeIfAbsent(chainHead, TargetChain::new).addPeer(peer); lastPeerTarget.put(peer, chainHead); }  void onPeerStatusUpdated(final SyncSource peer, final SlotAndBlockRoot chainHead); void onPeerDisconnected(final SyncSource peer); Stream<TargetChain> streamChains(); }
TargetChains { public void onPeerStatusUpdated(final SyncSource peer, final SlotAndBlockRoot chainHead) { removePeerFromLastChain(peer); chains.computeIfAbsent(chainHead, TargetChain::new).addPeer(peer); lastPeerTarget.put(peer, chainHead); }  void onPeerStatusUpdated(final SyncSource peer, final SlotAndBlockRoot chainHead); void onPeerDisconnected(final SyncSource peer); Stream<TargetChain> streamChains();  }