packages feed

haskoin-store 0.36.0 → 0.36.2

raw patch · 2 files changed

+14/−9 lines, 2 filesdep ~haskoin-storedep ~haskoin-store-data

Dependency ranges changed: haskoin-store, haskoin-store-data

Files

haskoin-store.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 59919146383deeb855254d8d6c939cf31929f9ff325d838ae674219063a2e363+-- hash: d19b7ad59d48f70e743259ee9a3e4b265aa80961c9f9a19f803ce9a6e67faed2  name:           haskoin-store-version:        0.36.0+version:        0.36.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@@ -53,7 +53,7 @@     , hashable >=1.3.0.0     , haskoin-core >=0.13.6     , haskoin-node >=0.14.1-    , haskoin-store-data ==0.36.0+    , haskoin-store-data ==0.36.2     , hedis >=0.12.13     , http-types >=0.12.3     , monad-logger >=0.3.32@@ -96,7 +96,7 @@     , haskoin-core >=0.13.6     , haskoin-node >=0.14.1     , haskoin-store-    , haskoin-store-data ==0.36.0+    , haskoin-store-data ==0.36.2     , monad-logger >=0.3.32     , mtl >=2.2.2     , nqe >=0.6.1@@ -135,8 +135,8 @@     , hashable >=1.3.0.0     , haskoin-core >=0.13.6     , haskoin-node >=0.14.1-    , haskoin-store ==0.36.0-    , haskoin-store-data ==0.36.0+    , haskoin-store ==0.36.2+    , haskoin-store-data ==0.36.2     , hedis >=0.12.13     , hspec >=2.7.1     , http-types >=0.12.3
src/Haskoin/Store/Database/Writer.hs view
@@ -15,7 +15,8 @@ import           Data.Hashable                 (Hashable) import           Data.HashMap.Strict           (HashMap) import qualified Data.HashMap.Strict           as M-import           Data.List                     (sort)+import           Data.List                     (sortOn)+import           Data.Ord                      (Down (..)) import           Database.RocksDB              (BatchOp) import           Database.RocksDB.Query        (deleteOp, insertOp, writeBatch) import           GHC.Generics                  (Generic)@@ -231,7 +232,11 @@                             , addrOutKeyP = p }  mempoolOp :: HashMap TxHash UnixTime -> [BatchOp]-mempoolOp = (: []) . insertOp MemKey . map (\(h, t) -> (t, h)) . M.toList+mempoolOp = (: [])+          . insertOp MemKey+          . sortOn Down+          . map (\(h, t) -> (t, h))+          . M.toList  unspentOps :: HashMap OutPoint (Dirty UnspentVal)            -> [BatchOp]@@ -340,7 +345,7 @@ getBalanceH a = M.lookup a . hBalance  getMempoolH :: Memory -> [TxRef]-getMempoolH = sort . map (\(h, t) -> TxRef (MemRef t) h) . M.toList . hMempool+getMempoolH = sortOn Down . map (\(h, t) -> TxRef (MemRef t) h) . M.toList . hMempool  setBestH :: BlockHash -> Memory -> Memory setBestH h db = db {hBest = Just h}