haskoin-store 0.2.0 → 0.2.1
raw patch · 3 files changed
+14/−10 lines, 3 files
Files
- CHANGELOG.md +4/−0
- haskoin-store.cabal +2/−2
- test/Spec.hs +8/−8
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.1.0+### Changed+- Fix tests+ ## 0.2.0 ### Added - Documentation everywhere.
haskoin-store.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: df37cb39caa6d4694913200ee8ccf5e190db23ea20a046529710b3b0f72252e8+-- hash: d2db143d3299c65407b7acb184fdfa25fcc90f3a6e1c81bfc9fb15c4813ad705 name: haskoin-store-version: 0.2.0+version: 0.2.1 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
test/Spec.hs view
@@ -6,7 +6,7 @@ import Control.Monad.Trans import Data.Maybe import Database.RocksDB (DB)-import qualified Database.RocksDB as RocksDB+import Database.RocksDB as R import Haskoin import Haskoin.Node import Haskoin.Store@@ -45,7 +45,7 @@ | otherwise -> get_the_block ((h :: Int) - 1) _ -> get_the_block h bh <- get_the_block 381- m <- getBlock bh testStoreDB Nothing+ m <- withSnapshot testStoreDB $ getBlock bh testStoreDB let BlockValue {..} = fromMaybe (error "Could not get block") m blockValueHeight `shouldBe` 381@@ -56,10 +56,10 @@ "7e621eeb02874ab039a8566fd36f4591e65eca65313875221842c53de6907d6c" head blockValueTxs `shouldBe` h1 last blockValueTxs `shouldBe` h2- t1 <- getTx net h1 testStoreDB Nothing+ t1 <- withSnapshot testStoreDB $ getTx net h1 testStoreDB t1 `shouldSatisfy` isJust txHash (detailedTxData (fromJust t1)) `shouldBe` h1- t2 <- getTx net h2 testStoreDB Nothing+ t2 <- withSnapshot testStoreDB $ getTx net h2 testStoreDB t2 `shouldSatisfy` isJust txHash (detailedTxData (fromJust t2)) `shouldBe` h2 @@ -69,11 +69,11 @@ withSystemTempDirectory ("haskoin-store-test-" <> t <> "-") $ \w -> runNoLoggingT $ do db <-- RocksDB.open+ open w- RocksDB.defaultOptions- { RocksDB.createIfMissing = True- , RocksDB.compression = RocksDB.SnappyCompression+ defaultOptions+ { createIfMissing = True+ , compression = SnappyCompression } let cfg = StoreConfig