class State {

  public void receiveGossipMessage(Peer peer, String attributes, Bytes message, Bytes messageHash) {
    Bytes checkHash = messageHashingFunction.hash(message);
    if (!checkHash.equals(messageHash)) {
      return;
    }
    peerRepository.considerNewPeer(peer);
    MessageHandler handler = messageHandlers.computeIfAbsent(messageHash, MessageHandler::new);
    handler.fullMessageReceived(peer, attributes, message);
  }

  public  State(
      PeerRepository peerRepository,
      MessageHashing messageHashingFunction,
      MessageSender messageSender,
      MessageListener messageListener,
      MessageValidator messageValidator,
      PeerPruning peerPruningFunction);
  public  State(
      PeerRepository peerRepository,
      MessageHashing messageHashingFunction,
      MessageSender messageSender,
      MessageListener messageListener,
      MessageValidator messageValidator,
      PeerPruning peerPruningFunction,
      long graftDelay,
      long lazyQueueInterval);

}