packages feed

haskoin-store 0.34.1 → 0.34.2

raw patch · 2 files changed

+13/−12 lines, 2 filesdep ~haskoin-storedep ~haskoin-store-data

Dependency ranges changed: haskoin-store, haskoin-store-data

Files

haskoin-store.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 7194d483a3a97de5193b1e79e587534fa3b778342599612d287289ce31d79799+-- hash: 4abbf05c9d06beeed2fc882666c6c8fdd2b036724366447bd998471b965e8191  name:           haskoin-store-version:        0.34.1+version:        0.34.2 synopsis:       Storage and index for Bitcoin and Bitcoin Cash description:    Please see the README on GitHub at <https://github.com/haskoin/haskoin-store#readme> category:       Bitcoin, Finance, Network@@ -53,7 +53,7 @@     , hashable >=1.3.0.0     , haskoin-core >=0.13.6     , haskoin-node >=0.14.1-    , haskoin-store-data ==0.34.1+    , haskoin-store-data ==0.34.2     , hedis >=0.12.13     , http-types >=0.12.3     , monad-logger >=0.3.32@@ -96,7 +96,7 @@     , haskoin-core >=0.13.6     , haskoin-node >=0.14.1     , haskoin-store-    , haskoin-store-data ==0.34.1+    , haskoin-store-data ==0.34.2     , monad-logger >=0.3.32     , mtl >=2.2.2     , nqe >=0.6.1@@ -135,8 +135,8 @@     , hashable >=1.3.0.0     , haskoin-core >=0.13.6     , haskoin-node >=0.14.1-    , haskoin-store ==0.34.1-    , haskoin-store-data ==0.34.1+    , haskoin-store ==0.34.2+    , haskoin-store-data ==0.34.2     , hedis >=0.12.13     , hspec >=2.7.1     , http-types >=0.12.3
src/Haskoin/Store/Web.hs view
@@ -718,8 +718,9 @@        (MonadUnliftIO m, MonadLoggerIO m) => GetMempool -> WebT m [TxHash] scottyMempool (GetMempool limitM (OffsetParam o)) = do     wl <- lift $ asks webMaxLimits-    let l = validateLimit wl False limitM-    take (fromIntegral l) . drop (fromIntegral o) . map txRefHash <$> getMempool+    let wl' = wl { maxLimitCount = 0 }+        l = Limits (validateLimit wl' False limitM) (fromIntegral o) Nothing+    map txRefHash . applyLimits l <$> getMempool  scottyEvents :: MonadLoggerIO m => WebT m () scottyEvents = do@@ -896,11 +897,11 @@                   => Chain -> WebTimeouts -> m TimeHealth lastTxHealthCheck ch tos = do     n <- fromIntegral . systemSeconds <$> liftIO getSystemTime+    b <- fromIntegral . H.blockTimestamp . H.nodeHeader <$> chainGetBest ch     t <- listToMaybe <$> getMempool >>= \case-        Just  t ->-            return $ fromIntegral $ memRefTime $ txRefBlock t-        Nothing ->-            fromIntegral . H.blockTimestamp . H.nodeHeader <$> chainGetBest ch+        Just t -> let x = fromIntegral $ memRefTime $ txRefBlock t+                  in return $ max x b+        Nothing -> return b     let timeHealthAge = n - t         timeHealthMax = fromIntegral $ txTimeout tos     return TimeHealth {..}