FIX duplicated txs
This commit is contained in:
parent
7609171ab4
commit
3bf6df3b49
|
@ -38,9 +38,8 @@ readBudget
|
|||
(intAllos, _) <- combineError intAlloRes acntRes (,)
|
||||
let res1 = mapErrors (readIncome c intAllos budgetSpan) bgtIncomes
|
||||
let res2 = expandTransfers c budgetSpan bgtTransfers
|
||||
txs <- combineError (concat <$> res1) res2 (++)
|
||||
shadow <- addShadowTransfers bgtShadowTransfers txs
|
||||
return $ txs ++ shadow
|
||||
combineErrorM (concat <$> res1) res2 $ \is ts ->
|
||||
addShadowTransfers bgtShadowTransfers (is ++ ts)
|
||||
where
|
||||
c = CommitR (CommitHash $ hash b) CTBudget
|
||||
acntRes = mapErrors isNotIncomeAcnt alloAcnts
|
||||
|
|
|
@ -81,6 +81,7 @@ sync pool root c bs hs = do
|
|||
liftIO $ print $ length $ coRead history
|
||||
liftIO $ print $ length $ coUpdate history
|
||||
liftIO $ print $ (\(DeleteTxs e a b c' d) -> (length e, length a, length b, length c', length d)) $ coDelete history
|
||||
liftIO $ print $ fmap (length . snd) $ coCreate budgets'
|
||||
-- liftIO $ print $ length $ M.elems $ tsAccountMap txState
|
||||
-- liftIO $ print $ length $ M.elems $ tsCurrencyMap txState
|
||||
-- liftIO $ print $ length $ M.elems $ tsTagMap txState
|
||||
|
|
Loading…
Reference in New Issue