summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjprupp <>2021-02-22 23:55:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2021-02-22 23:55:00 (GMT)
commitc681032dd05b96044f48334348b1ea8d69d72cce (patch)
tree6da3452127a6fc6c609d336f0a53d4dff37ca21a
parenta7fd1a740d7222c9f9392640925a225c72daf5d5 (diff)
version 0.47.20.47.2
-rw-r--r--CHANGELOG.md4
-rw-r--r--haskoin-store.cabal10
-rw-r--r--src/Haskoin/Store/Web.hs10
3 files changed, 15 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5c103bd..89b9156 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
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.47.2
+### Fixed
+- Fix serialization bug for health check.
+
## 0.47.1
### Fixed
- Fix serialization bugs for web data types.
diff --git a/haskoin-store.cabal b/haskoin-store.cabal
index 345dc9b..4a89dca 100644
--- a/haskoin-store.cabal
+++ b/haskoin-store.cabal
@@ -4,10 +4,10 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
--- hash: ff4a7aa140e43d4d77540711eef740057152592f5a48cdcd968ab1eca8176fbe
+-- hash: 1496ff19275a9949a906f360913bb037ff09b00be3a0be9024799df0ec21eb18
name: haskoin-store
-version: 0.47.1
+version: 0.47.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
@@ -61,7 +61,7 @@ library
, hashable >=1.3.0.0
, haskoin-core >=0.19.0
, haskoin-node >=0.17.0
- , haskoin-store-data ==0.47.1
+ , haskoin-store-data ==0.47.2
, hedis >=0.12.13
, http-types >=0.12.3
, lens >=4.18.1
@@ -113,7 +113,7 @@ executable haskoin-store
, haskoin-core >=0.19.0
, haskoin-node >=0.17.0
, haskoin-store
- , haskoin-store-data ==0.47.1
+ , haskoin-store-data ==0.47.2
, hedis >=0.12.13
, http-types >=0.12.3
, lens >=4.18.1
@@ -170,7 +170,7 @@ test-suite haskoin-store-test
, haskoin-core >=0.19.0
, haskoin-node >=0.17.0
, haskoin-store
- , haskoin-store-data ==0.47.1
+ , haskoin-store-data ==0.47.2
, hedis >=0.12.13
, hspec >=2.7.1
, http-types >=0.12.3
diff --git a/src/Haskoin/Store/Web.hs b/src/Haskoin/Store/Web.hs
index 147fd9c..7ab1b7e 100644
--- a/src/Haskoin/Store/Web.hs
+++ b/src/Haskoin/Store/Web.hs
@@ -1663,7 +1663,7 @@ blockHealthCheck :: (MonadUnliftIO m, MonadLoggerIO m, StoreReadBase m)
=> WebConfig -> m BlockHealth
blockHealthCheck cfg = do
let ch = storeChain $ webStore cfg
- blockHealthMaxDiff = webMaxDiff cfg
+ blockHealthMaxDiff = fromIntegral $ webMaxDiff cfg
blockHealthHeaders <-
H.nodeHeight <$> chainGetBest ch
blockHealthBlocks <-
@@ -1699,15 +1699,17 @@ lastTxHealthCheck WebConfig {..} = do
pendingTxsHealthCheck :: (MonadUnliftIO m, MonadLoggerIO m, StoreReadBase m)
=> WebConfig -> m MaxHealth
pendingTxsHealthCheck cfg = do
- let maxHealthMax = webMaxPending cfg
- maxHealthNum <- blockStorePendingTxs (storeBlock (webStore cfg))
+ let maxHealthMax = fromIntegral $ webMaxPending cfg
+ maxHealthNum <-
+ fromIntegral <$>
+ blockStorePendingTxs (storeBlock (webStore cfg))
return MaxHealth {..}
peerHealthCheck :: (MonadUnliftIO m, MonadLoggerIO m, StoreReadBase m)
=> PeerManager -> m CountHealth
peerHealthCheck mgr = do
let countHealthMin = 1
- countHealthNum <- length <$> getPeers mgr
+ countHealthNum <- fromIntegral . length <$> getPeers mgr
return CountHealth {..}
healthCheck :: (MonadUnliftIO m, MonadLoggerIO m, StoreReadBase m)