startNodeComm :: CommandDispatcher -> HostName -> PortNumber -> IO ()
startNodeComm (CommandDispatcher handleConsensusMessage getMsgsToSendToConsensusNodes sendToConsensusNodes _ _ isValid) host port = do
  _ <- infoN host port "startNodeComm: ENTER"
  (sendSock, sendAddr) <- multicastSender host port
  recSock <- multicastReceiver host port
  forkIO $ send host port sendSock sendAddr getMsgsToSendToConsensusNodes
  forkIO $ rec host port recSock sendSock sendAddr handleConsensusMessage sendToConsensusNodes isValid
  infoN host port "startNodeComm: EXIT"
  return ()
startNodeComm :: CommandDispatcher -> HostName -> PortNumber -> IO ()
startNodeComm (CommandDispatcher handleConsensusMessage getMsgsToSendToConsensusNodes sendToConsensusNodes _ _ isValid) host port = do
  _ <- infoN host port "startNodeComm: ENTER"
  (sendSock, sendAddr) <- multicastSender host port
  recSock <- multicastReceiver host port
  forkIO $ send host port sendSock sendAddr getMsgsToSendToConsensusNodes
  forkIO $ rec host port recSock sendSock sendAddr handleConsensusMessage sendToConsensusNodes isValid
  infoN host port "startNodeComm: EXIT"
  return ()
startNodeComm (CommandDispatcher handleConsensusMessage getMsgsToSendToConsensusNodes sendToConsensusNodes _ _ isValid) host port = do
  _ <- infoN host port "startNodeComm: ENTER"
  (sendSock, sendAddr) <- multicastSender host port
  recSock <- multicastReceiver host port
  forkIO $ send host port sendSock sendAddr getMsgsToSendToConsensusNodes
  forkIO $ rec host port recSock sendSock sendAddr handleConsensusMessage sendToConsensusNodes isValid
  infoN host port "startNodeComm: EXIT"
  return ()