<commit_before>{-# LANGUAGE AllowAmbiguousTypes   #-}
{-# LANGUAGE CPP                   #-}
{-# LANGUAGE FlexibleContexts      #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ViewPatterns          #-}

-- | Server which handles transactions.

module Pos.Txp.Listeners
       ( txListeners
       ) where

import qualified Data.HashMap.Strict          as HM
import qualified Data.List.NonEmpty           as NE
import           Formatting                   (build, sformat, stext, (%))
import           System.Wlog                  (logDebug, logInfo, logWarning)
import           Universum

import           Pos.Binary.Txp               ()
import           Pos.Communication.Methods    (sendToNeighborsSafe)
import           Pos.Communication.Types      (MutSocketState, ResponseMode)
import           Pos.Context                  (WithNodeContext (getNodeContext),
                                               ncPropagation)
import           Pos.Crypto                   (hash)
import           Pos.DHT.Model                (ListenerDHT (..), MonadDHTDialog,
                                               replyToNode)
import           Pos.State                    (ProcessTxRes (..))
import qualified Pos.State                    as St
import           Pos.Statistics               (StatProcessTx (..), statlogCountEvent)
import           Pos.Txp.Types.Communication  (TxDataMsg (..), TxInvMsg (..),
                                               TxReqMsg (..))
import           Pos.Types                    (IdTxWitness, TxId)
import           Pos.WorkMode                 (WorkMode)

#ifdef MODERN
import           Pos.Modern.Txp.Class         (MonadTxpLD (getMemPool))
import           Pos.Modern.Txp.Storage       (processTx)
import           Pos.Modern.Txp.Storage.Types (MemPool (..), TxMap)
#else
import           Pos.Txp.LocalData            (txLocalDataProcessTx)
import           Pos.Txp.LocalData            (getLocalTxs)<commit_msg>Fix modern compilation<commit_after>{-# LANGUAGE AllowAmbiguousTypes   #-}
{-# LANGUAGE CPP                   #-}
{-# LANGUAGE FlexibleContexts      #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ViewPatterns          #-}

-- | Server which handles transactions.

module Pos.Txp.Listeners
       ( txListeners
       ) where

import qualified Data.HashMap.Strict          as HM
import qualified Data.List.NonEmpty           as NE
import           Formatting                   (build, sformat, stext, (%))
import           System.Wlog                  (logDebug, logInfo, logWarning)
import           Universum

import           Pos.Binary.Txp               ()
import           Pos.Communication.Methods    (sendToNeighborsSafe)
import           Pos.Communication.Types      (MutSocketState, ResponseMode)
import           Pos.Context                  (WithNodeContext (getNodeContext),
                                               ncPropagation)
import           Pos.Crypto                   (hash)
import           Pos.DHT.Model                (ListenerDHT (..), MonadDHTDialog,
                                               replyToNode)
import           Pos.State                    (ProcessTxRes (..))
import qualified Pos.State                    as St
import           Pos.Statistics               (StatProcessTx (..), statlogCountEvent)
import           Pos.Txp.Types.Communication  (TxDataMsg (..), TxInvMsg (..),
                                               TxReqMsg (..))
import           Pos.Types                    (IdTxWitness, TxId)
import           Pos.WorkMode                 (WorkMode)

#ifdef MODERN
import           Pos.Modern.Txp.Class         (MonadTxpLD (getMemPool))
import           Pos.Modern.Txp.Logic         (processTx)
import           Pos.Modern.Txp.Storage.Types (MemPool (..), TxMap)
#else
import           Pos.Txp.LocalData            (txLocalDataProcessTx)
import           Pos.Txp.LocalData            (getLocalTxs)
{'fraction_non_alphanumeric': 0.08416220351951033, 'fraction_numerical': 0.0, 'mean_word_length': 1.3612281757977123, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3709917', 'n_tokens_mistral': 1024, 'n_tokens_neox': 994, 'n_words': 215}