packages feed

haskoin-store 0.23.7 → 0.23.8

raw patch · 3 files changed

+20/−10 lines, 3 files

Files

CHANGELOG.md view
@@ -4,6 +4,14 @@ 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.23.8+### Added+- Chunk transactions to be deleted from mempool.++## 0.23.7+### Added+- Mempool improvements.+ ## 0.23.6 ### Added - Ability to wipe mempool at start.
haskoin-store.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 5647240d12c600ec320ddcf3af88d203d5be73e9a92d370ce030d34be475dd67+-- hash: 23077ea7f62cd0d7cf032a9489ecf080a1abe3fcd90e3aaf166fb2b5b40ed108  name:           haskoin-store-version:        0.23.7+version:        0.23.8 synopsis:       Storage and index for Bitcoin and Bitcoin Cash description:    Store and index Bitcoin or Bitcoin Cash blocks, transactions, balances and unspent outputs.                 All data is available via REST API in JSON or binary format.
src/Haskoin/Store/BlockStore.hs view
@@ -166,14 +166,16 @@             deleteTx True (blockTxHash tx)     wipe         | blockConfWipeMempool cfg = do-            txs <- getMempool-            runImport (del txs) >>= \case-                Left e -> do-                    $(logErrorS) "BlockStore" $-                        "Could not delete mempool, database corrupt: " <>-                        cs (show e)-                    throwIO CorruptDatabase-                Right _ -> return ()+            take 1000 <$> getMempool >>= \case+                [] -> return ()+                txs ->+                    runImport (del txs) >>= \case+                        Left e -> do+                            $(logErrorS) "BlockStore" $+                                "Could not delete mempool, database corrupt: " <>+                                cs (show e)+                            throwIO CorruptDatabase+                        Right _ -> return ()         | otherwise = return ()     ini = do         runImport initBest >>= \case