haskoin-store 0.57.0 → 0.58.0
raw patch · 3 files changed
+7/−11 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- haskoin-store.cabal +1/−1
- src/Haskoin/Store/Logic.hs +2/−10
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.58.0+### Fixed+- Correct output freeing algorithm.+ ## 0.57.0 ### Changed - Report errors freeing outputs.
haskoin-store.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: haskoin-store-version: 0.57.0+version: 0.58.0 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
src/Haskoin/Store/Logic.hs view
@@ -397,19 +397,11 @@ freeOutputs memonly rbfcheck tx = do let prevs = prevOuts tx unspents <- mapM getUnspent prevs- let spents = map fst $ filter (isNothing . snd) $ zip prevs unspents- spndrs <- mapM (\s -> getSpender s >>= spender s) spents+ let spents = [ p | (p, Nothing) <- zip prevs unspents ]+ spndrs <- catMaybes <$> mapM getSpender spents let txids = HashSet.fromList $ filter (/= txHash tx) $ map spenderHash spndrs del <- fmap concat $ mapM (deleteTx memonly rbfcheck) $ HashSet.toList txids return $ HashSet.fromList del- where- spender s Nothing = do- $(logErrorS) "BlockStore" $- "Spender not found for output " <>- txHashToHex (outPointHash s) <> ":" <>- cs (show (outPointIndex s))- throwError SpenderNotFound- spender _ (Just s) = return s deleteConfirmedTx :: MonadImport m => TxHash -> m [TxHash] deleteConfirmedTx = deleteTx False False