packages feed

haskoin-store 0.18.9 → 0.18.10

raw patch · 4 files changed

+33/−19 lines, 4 files

Files

CHANGELOG.md view
@@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.18.10+### Removed+- Disable timeout checks for testnets.+ ## 0.18.9 ### Added - Endpoint to locate a block by unix timestamp.
app/Main.hs view
@@ -86,12 +86,12 @@ config = do     configDir <-         option str $-        metavar "DIR" <> long "dir" <> short 'd' <> help "Data directory" <>+        metavar "WORKDIR" <> long "dir" <> short 'd' <> help "Data directory" <>         showDefault <>         value myDirectory     configPort <-         option auto $-        metavar "INT" <> long "listen" <> short 'l' <> help "Listening port" <>+        metavar "PORT" <> long "listen" <> short 'l' <> help "Listening port" <>         showDefault <>         value defPort     configNetwork <-@@ -107,48 +107,49 @@         help "Network peer (as many as required)"     configCache <-         option str $-        long "cache" <> short 'c' <> help "RAM drive directory for acceleration" <>+        metavar "CACHEDIR" <> long "cache" <> short 'c' <>+        help "RAM drive directory for acceleration" <>         value ""     configVersion <- switch $ long "version" <> short 'v' <> help "Show version"     configDebug <- switch $ long "debug" <> help "Show debug messages"     configReqLog <- switch $ long "reqlog" <> help "HTTP request logging"     maxLimitCount <-         option auto $-        metavar "INT" <> long "maxlimit" <>+        metavar "MAXLIMIT" <> long "maxlimit" <>         help "Max limit for listings (0 for no limit)" <>         showDefault <>         value (maxLimitCount defMaxLimits)     maxLimitFull <-         option auto $-        metavar "INT" <> long "maxfull" <>+        metavar "MAXLIMITFULL" <> long "maxfull" <>         help "Max limit for full listings (0 for no limit)" <>         showDefault <>         value (maxLimitFull defMaxLimits)     maxLimitOffset <-         option auto $-        metavar "INT" <> long "maxoffset" <> help "Max offset (0 for no limit)" <>+        metavar "MAXOFFSET" <> long "maxoffset" <> help "Max offset (0 for no limit)" <>         showDefault <>         value (maxLimitOffset defMaxLimits)     maxLimitDefault <-         option auto $-        metavar "INT" <> long "deflimit" <> help "Default limit (0 for max)" <>+        metavar "LIMITDEFAULT" <> long "deflimit" <> help "Default limit (0 for max)" <>         showDefault <>         value (maxLimitDefault defMaxLimits)     maxLimitGap <-         option auto $-        metavar "INT" <> long "gap" <> help "Extended public key gap" <>+        metavar "GAP" <> long "gap" <> help "Extended public key gap" <>         showDefault <>         value (maxLimitGap defMaxLimits)     blockTimeout <-         option auto $-        metavar "INT" <> long "blocktimeout" <>-        help "Unhealthy if no block for this many seconds" <>+        metavar "BLOCKSECONDS" <> long "blocktimeout" <>+        help "Last block mined timeout (0 for infinite)" <>         showDefault <>         value (blockTimeout defTimeouts)     txTimeout <-         option auto $-        metavar "INT" <> long "txtimeout" <>-        help "Unhealthy if no new tx in this many seconds" <>+        metavar "TXSECONDS" <> long "txtimeout" <>+        help "Last transaction broadcast timeout (0 for infinite)" <>         showDefault <>         value (txTimeout defTimeouts)     pure
haskoin-store.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: ae63b94f9946af9c24a7c77d5c813b16fd1f2756702562e7d73fe71330d06cf1+-- hash: cccbc11cbc16bb33ed6ab5746bf2624639729f8aacd7027ee088452541ccf5b9  name:           haskoin-store-version:        0.18.9+version:        0.18.10 synopsis:       Storage and index for Bitcoin and Bitcoin Cash description:    Store blocks, transactions, and balances for Bitcoin or Bitcoin Cash, and make that information via REST API. category:       Bitcoin, Finance, Network
src/Network/Haskoin/Store/Web.hs view
@@ -944,12 +944,21 @@             maybe_block_best         maybe_tx_time_delta =             (now -) <$> maybe_mempool_last <|> maybe_block_time_delta-        status_ok =-            (isNothing maybe_chain_best ||-             isNothing maybe_block_best ||-             maybe False (not . Data.List.null) peers) &&-            maybe False (<= blockTimeout tos) maybe_block_time_delta &&+        peers_ok = maybe False (not . Data.List.null) peers+        block_timeout_ok =+            getAllowMinDifficultyBlocks net ||+            blockTimeout tos == 0 ||+            maybe False (<= blockTimeout tos) maybe_block_time_delta+        tx_timeout_ok =+            getAllowMinDifficultyBlocks net ||+            txTimeout tos == 0 ||             maybe False (<= txTimeout tos) maybe_tx_time_delta+        status_ok =+            isJust maybe_chain_best &&+            isJust maybe_block_best &&+            peers_ok &&+            block_timeout_ok &&+            tx_timeout_ok         synced =             isJust $ do                 x <- maybe_chain_best