Skip to content

Commit 4a28e68

Browse files
committed
adjusting runDbTransSilent to not be maybe
1 parent c515d19 commit 4a28e68

17 files changed

Lines changed: 483 additions & 397 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ launch_*
1515
gen/
1616
cardano-chain-gen/test/testfiles/temp/
1717
/secp256k1/
18-
dev-tools/monitoring/data/
18+
monitoring/data/
1919

2020
# Vim
2121
*.swp

cardano-db-sync/src/Cardano/DbSync/Database.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,18 @@ runActions syncEnv actions = do
130130
-- Record start time and block count for performance metrics
131131
startTime <- liftIO getCurrentTime
132132
let blockCount = length ys
133-
133+
134134
-- Process blocks
135135
ExceptT $ insertListBlocks syncEnv ys
136-
136+
137137
-- Calculate and record blocks per second
138138
when (blockCount > 0) $ do
139139
endTime <- liftIO getCurrentTime
140140
let duration = realToFrac $ diffUTCTime endTime startTime
141141
when (duration > 0) $ do
142142
let blocksPerSecond = fromIntegral blockCount / duration
143143
liftIO $ setDbBlocksPerSecond (envMetricSetters syncEnv) blocksPerSecond
144-
144+
145145
if null zs
146146
then pure Continue
147147
else dbEvent Continue zs

cardano-db-sync/src/Cardano/DbSync/Default.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import Cardano.Prelude
1919
import Cardano.Slotting.Slot (EpochNo (..), SlotNo)
2020
import qualified Data.ByteString.Short as SBS
2121
import Data.List (span)
22-
import Data.Time.Clock (diffUTCTime, getCurrentTime)
2322
import qualified Data.Set as Set
2423
import qualified Data.Strict.Maybe as Strict
24+
import Data.Time.Clock (diffUTCTime, getCurrentTime)
2525
import Ouroboros.Consensus.Cardano.Block (HardForkBlock (..))
2626
import qualified Ouroboros.Consensus.HardFork.Combinator as Consensus
2727
import Ouroboros.Network.Block (blockHash, blockNo, getHeaderFields, headerFieldBlockNo, unBlockNo)
@@ -155,7 +155,7 @@ insertBlock ::
155155
insertBlock syncEnv cblk applyRes firstAfterRollback tookSnapshot = do
156156
-- Start timing for insert duration metric
157157
startTime <- liftIO getCurrentTime
158-
158+
159159
!epochEvents <- liftIO $ atomically $ generateNewEpochEvents syncEnv (apSlotDetails applyRes)
160160
let !applyResult = applyRes {apEvents = sort $ epochEvents <> apEvents applyRes}
161161
let !details = apSlotDetails applyResult
@@ -211,7 +211,7 @@ insertBlock syncEnv cblk applyRes firstAfterRollback tookSnapshot = do
211211
do
212212
lift $ DB.deleteConsumedTxOut tracer txOutVariantType (getSafeBlockNoDiff syncEnv)
213213
commitOrIndexes withinTwoMin withinHalfHour
214-
214+
215215
-- Record insert duration metric
216216
endTime <- liftIO getCurrentTime
217217
let duration = realToFrac $ diffUTCTime endTime startTime

dev-tools/README.md

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)