packages feed

haskoin-store-data 0.41.0 → 0.41.3

raw patch · 2 files changed

+10/−10 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Haskoin.Store.Data: toBinfoTx :: Maybe (HashMap TxHash Transaction) -> HashMap Address (Maybe BinfoXPubPath) -> HashSet Address -> Bool -> Int64 -> Transaction -> BinfoTx
+ Haskoin.Store.Data: toBinfoTx :: Maybe (HashMap TxHash Transaction) -> HashMap Address (Maybe BinfoXPubPath) -> Bool -> Int64 -> Transaction -> BinfoTx

Files

haskoin-store-data.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 8787598b7df413727491c19974d63711e10977ac5d6f324a710ddc6ea21c8490+-- hash: 27988a8740b2340e21ae4c0a14ef926f1904d73b09465e41bf6d4a11b9e3c1da  name:           haskoin-store-data-version:        0.41.0+version:        0.41.3 synopsis:       Data for Haskoin Store description:    Please see the README on GitHub at <https://github.com/haskoin/haskoin-store#readme> category:       Bitcoin, Finance, Network
src/Haskoin/Store/Data.hs view
@@ -2293,7 +2293,7 @@                 -> Transaction                 -> BinfoTx toBinfoTxSimple etxs =-    toBinfoTx etxs HashMap.empty HashSet.empty False 0+    toBinfoTx etxs HashMap.empty False 0  toBinfoTxInputs :: Maybe (HashMap TxHash Transaction)                 -> HashMap Address (Maybe BinfoXPubPath)@@ -2327,12 +2327,11 @@  toBinfoTx :: Maybe (HashMap TxHash Transaction)           -> HashMap Address (Maybe BinfoXPubPath)-          -> HashSet Address           -> Bool           -> Int64           -> Transaction           -> BinfoTx-toBinfoTx etxs abook saddrs prune bal t@Transaction{..} =+toBinfoTx etxs abook prune bal t@Transaction{..} =     BinfoTx{ getBinfoTxHash = txHash (transactionData t)            , getBinfoTxVer = transactionVersion            , getBinfoTxVinSz = fromIntegral (length transactionInputs)@@ -2352,15 +2351,16 @@            , getBinfoTxResultBal = resbal            }   where-    simple = HashSet.null saddrs && HashMap.null abook && bal == 0-    resbal = if simple then Nothing else Just (getTxResult saddrs t, bal)+    simple = HashMap.null abook && bal == 0+    resbal = if simple then Nothing else Just (getTxResult aset t, bal)+    aset = HashMap.keysSet abook     outs =-        let p = prune && getTxResult saddrs t > 0+        let p = prune && getTxResult aset t > 0             f = toBinfoTxOutput etxs abook p t         in catMaybes $ zipWith f [0..] transactionOutputs  getTxResult :: HashSet Address -> Transaction -> Int64-getTxResult saddrs Transaction{..} =+getTxResult aset Transaction{..} =     let input_sum = sum $ map input_value transactionInputs         input_value StoreCoinbase{} = 0         input_value StoreInput{..} =@@ -2370,7 +2370,7 @@                     if test_addr a                     then negate $ fromIntegral inputAmount                     else 0-        test_addr a = HashSet.member a saddrs+        test_addr a = HashSet.member a aset         output_sum = sum $ map out_value transactionOutputs         out_value StoreOutput{..} =             case outputAddress of