Skip to content

Commit 1143664

Browse files
committed
update errors
1 parent c486d58 commit 1143664

File tree

49 files changed

+845
-798
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+845
-798
lines changed

cardano-chain-gen/test/Test/Cardano/Db/Mock/Unit/Conway/Config/Schema.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ setupTestData interpreter mockServer dbSync = do
137137
-- Individual Table Validation Functions
138138
------------------------------------------------------------------------------
139139

140-
-- | Validate TxOutCore table column order
140+
-- | Validate table column order for any DbInfo type
141141
validateCall :: forall a. DB.DbInfo a => DBSyncEnv -> Proxy a -> IO ()
142142
validateCall dbSync proxy = do
143143
result <- queryDBSync dbSync $ DB.queryTableColumns proxy

cardano-chain-gen/test/Test/Cardano/Db/Mock/Validate.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,20 +150,20 @@ assertBackoff env query delays check errMsg = go delays
150150

151151
assertQuery :: DBSyncEnv -> DB.DbM a -> (a -> Bool) -> (a -> String) -> IO (Maybe String)
152152
assertQuery env query check errMsg = do
153-
ma <- try @DB.DbError $ queryDBSync env query
153+
ma <- try @DB.DbSessionError $ queryDBSync env query
154154
case ma of
155-
Left dbErr | migrationNotDoneYet (DB.dbErrorMessage dbErr) -> do
155+
Left dbErr | migrationNotDoneYet (DB.dbSessionErrMsg dbErr) -> do
156156
threadDelay 1_000_000
157-
pure $ Just $ Text.unpack $ DB.dbErrorMessage dbErr
157+
pure $ Just $ Text.unpack $ DB.dbSessionErrMsg dbErr
158158
Left err -> throwIO err
159159
Right a | not (check a) -> pure $ Just $ errMsg a
160160
_ -> pure Nothing
161161

162162
runQuery :: DBSyncEnv -> DB.DbM a -> IO a
163163
runQuery env query = do
164-
ma <- try @DB.DbError $ queryDBSync env query
164+
ma <- try @DB.DbSessionError $ queryDBSync env query
165165
case ma of
166-
Left dbErr | migrationNotDoneYet (DB.dbErrorMessage dbErr) -> do
166+
Left dbErr | migrationNotDoneYet (DB.dbSessionErrMsg dbErr) -> do
167167
threadDelay 1_000_000
168168
runQuery env query
169169
Left err -> throwIO err

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ runSyncNode metricsSetters trce iomgr dbConnSetting runNearTipMigrationFnc syncN
211211
then DB.createDbEnv dbConn (Just pool) (Just trce)
212212
else DB.createDbEnv dbConn (Just pool) Nothing
213213
genCfg <- readCardanoGenesisConfig syncNodeConfigFromFile
214-
isJsonbInSchema <- liftDbError $ DB.queryJsonbInSchemaExists dbConn
214+
isJsonbInSchema <- liftSessionIO mkSyncNodeCallStack $ DB.queryJsonbInSchemaExists dbConn
215215
logProtocolMagicId trce $ genesisProtocolMagicId genCfg
216216
syncEnv <-
217217
ExceptT $

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

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import Cardano.DbSync.Cache.Epoch (rollbackMapEpochInCache)
5151
import qualified Cardano.DbSync.Cache.FIFO as FIFO
5252
import qualified Cardano.DbSync.Cache.LRU as LRU
5353
import Cardano.DbSync.Cache.Types (CacheAction (..), CacheInternal (..), CacheStatistics (..), CacheStatus (..), StakeCache (..), shouldCache)
54-
import Cardano.DbSync.DbEvent (liftFail)
54+
import Cardano.DbSync.DbEvent (liftDbLookup)
5555
import qualified Cardano.DbSync.Era.Shelley.Generic.Util as Generic
5656
import Cardano.DbSync.Era.Shelley.Query
5757
import Cardano.DbSync.Error (SyncNodeError (..), mkSyncNodeCallStack)
@@ -113,10 +113,10 @@ optimiseCaches cache =
113113
-- Trim pools Map to target size (keep most recent entries)
114114
atomically $ modifyTVar (cPools c) $ \poolMap ->
115115
Map.fromList $ take (fromIntegral $ cOptimisePools c) $ Map.toList poolMap
116-
116+
117117
-- Trim stake stable cache to target size
118118
atomically $ modifyTVar (cStake c) $ \stakeCache ->
119-
stakeCache { scStableCache = Map.fromList $ take (fromIntegral $ cOptimiseStake c) $ Map.toList (scStableCache stakeCache) }
119+
stakeCache {scStableCache = Map.fromList $ take (fromIntegral $ cOptimiseStake c) $ Map.toList (scStableCache stakeCache)}
120120

121121
queryOrInsertRewardAccount ::
122122
SyncEnv ->
@@ -218,13 +218,13 @@ queryPoolKeyWithCache ::
218218
SyncEnv ->
219219
CacheAction ->
220220
PoolKeyHash ->
221-
ExceptT SyncNodeError DB.DbM (Either DB.DbError DB.PoolHashId)
221+
ExceptT SyncNodeError DB.DbM (Either DB.DbSessionError DB.PoolHashId)
222222
queryPoolKeyWithCache syncEnv cacheUA hsh =
223223
case envCache syncEnv of
224224
NoCache -> do
225225
mPhId <- lift $ DB.queryPoolHashId (Generic.unKeyHashRaw hsh)
226226
case mPhId of
227-
Nothing -> pure $ Left $ DB.DbError "queryPoolKeyWithCache: NoCache queryPoolHashId"
227+
Nothing -> pure $ Left $ DB.DbSessionError DB.mkDbCallStack "queryPoolKeyWithCache: NoCache queryPoolHashId"
228228
Just phId -> pure $ Right phId
229229
ActiveCache ci -> do
230230
mp <- liftIO $ readTVarIO (cPools ci)
@@ -242,7 +242,7 @@ queryPoolKeyWithCache syncEnv cacheUA hsh =
242242
liftIO $ missPools syncEnv
243243
mPhId <- lift $ DB.queryPoolHashId (Generic.unKeyHashRaw hsh)
244244
case mPhId of
245-
Nothing -> pure $ Left $ DB.DbError "queryPoolKeyWithCache: ActiveCache queryPoolHashId"
245+
Nothing -> pure $ Left $ DB.DbSessionError DB.mkDbCallStack "queryPoolKeyWithCache: ActiveCache queryPoolHashId"
246246
Just phId -> do
247247
-- missed so we can't evict even with 'EvictAndReturn'
248248
when (shouldCache cacheUA) $
@@ -412,7 +412,7 @@ queryPrevBlockWithCache ::
412412
queryPrevBlockWithCache syncEnv hsh errMsg =
413413
case envCache syncEnv of
414414
NoCache ->
415-
liftFail cs $ DB.queryBlockId hsh errMsg
415+
liftDbLookup mkSyncNodeCallStack $ DB.queryBlockId hsh errMsg
416416
ActiveCache ci -> do
417417
mCachedPrev <- liftIO $ readTVarIO (cPrevBlock ci)
418418
case mCachedPrev of
@@ -425,18 +425,16 @@ queryPrevBlockWithCache syncEnv hsh errMsg =
425425
else queryFromDb
426426
Nothing -> queryFromDb
427427
where
428-
cs = mkSyncNodeCallStack "queryPrevBlockWithCache"
429-
430428
queryFromDb ::
431429
ExceptT SyncNodeError DB.DbM DB.BlockId
432430
queryFromDb = do
433431
liftIO $ missPrevBlock syncEnv
434-
liftFail cs $ DB.queryBlockId hsh errMsg
432+
liftDbLookup mkSyncNodeCallStack $ DB.queryBlockId hsh errMsg
435433

436434
queryTxIdWithCache ::
437435
SyncEnv ->
438436
Ledger.TxId ->
439-
ExceptT SyncNodeError DB.DbM (Either DB.DbError DB.TxId)
437+
ExceptT SyncNodeError DB.DbM (Either DB.DbLookupError DB.TxId)
440438
queryTxIdWithCache syncEnv txIdLedger = do
441439
case envCache syncEnv of
442440
-- Direct database query if no cache.
@@ -470,7 +468,7 @@ queryTxIdWithCache syncEnv txIdLedger = do
470468
case result of
471469
Just txId -> pure $ Right txId
472470
Nothing ->
473-
pure $ Left $ DB.DbError ("TxId not found for hash: " <> textShow txHash)
471+
pure $ Left $ DB.DbLookupError DB.mkDbCallStack ("TxId not found for hash: " <> textShow txHash)
474472

475473
tryUpdateCacheTx ::
476474
MonadIO m =>

cardano-db-sync/src/Cardano/DbSync/Cache/Epoch.hs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ writeEpochBlockDiffToCache ::
6464
writeEpochBlockDiffToCache cache epCurrent =
6565
case cache of
6666
NoCache -> do
67-
let cs = mkSyncNodeCallStack "writeEpochBlockDiffToCache"
68-
throwError $ SNErrDefault cs "Cache is NoCache"
67+
throwError $ SNErrDefault mkSyncNodeCallStack "Cache is NoCache"
6968
ActiveCache ci -> do
7069
cE <- liftIO $ readTVarIO (cEpoch ci)
7170
case (ceMapEpoch cE, ceEpochBlockDiff cE) of
@@ -80,19 +79,18 @@ writeToMapEpochCache ::
8079
DB.Epoch ->
8180
ExceptT SyncNodeError DB.DbM ()
8281
writeToMapEpochCache syncEnv cache latestEpoch = do
83-
let cs = mkSyncNodeCallStack "writeToMapEpochCache"
8482
-- this can also be tought of as max rollback number
8583
let securityParam =
8684
case envLedgerEnv syncEnv of
8785
HasLedger hle -> getSecurityParameter $ leProtocolInfo hle
8886
NoLedger nle -> getSecurityParameter $ nleProtocolInfo nle
8987
case cache of
90-
NoCache -> throwError $ SNErrDefault cs "Cache is NoCache"
88+
NoCache -> throwError $ SNErrDefault mkSyncNodeCallStack "Cache is NoCache"
9189
ActiveCache ci -> do
9290
-- get EpochBlockDiff so we can use the BlockId we stored when inserting blocks
9391
epochInternalCE <- readEpochBlockDiffFromCache cache
9492
case epochInternalCE of
95-
Nothing -> throwError $ SNErrDefault cs "No epochInternalEpochCache"
93+
Nothing -> throwError $ SNErrDefault mkSyncNodeCallStack "No epochInternalEpochCache"
9694
Just ei -> do
9795
cE <- liftIO $ readTVarIO (cEpoch ci)
9896
let currentBlockId = ebdBlockId ei

cardano-db-sync/src/Cardano/DbSync/Cache/Types.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ data CacheInternal = CacheInternal
8282
, cEpoch :: !(StrictTVar IO CacheEpoch)
8383
, cAddress :: !(StrictTVar IO (LRUCache ByteString DB.AddressId))
8484
, cTxIds :: !(StrictTVar IO (FIFOCache Ledger.TxId DB.TxId))
85-
-- Optimisation target sizes for Map-based caches
86-
, cOptimisePools :: !Word64
85+
, -- Optimisation target sizes for Map-based caches
86+
cOptimisePools :: !Word64
8787
, cOptimiseStake :: !Word64
8888
}
8989

@@ -111,8 +111,8 @@ data CacheCapacity = CacheCapacity
111111
, cacheCapacityDatum :: !Word64
112112
, cacheCapacityMultiAsset :: !Word64
113113
, cacheCapacityTx :: !Word64
114-
-- Optimisation target sizes for Map-based caches (used every 100k blocks)
115-
, cacheOptimisePools :: !Word64
114+
, -- Optimisation target sizes for Map-based caches (used every 100k blocks)
115+
cacheOptimisePools :: !Word64
116116
, cacheOptimiseStake :: !Word64
117117
}
118118

cardano-db-sync/src/Cardano/DbSync/Config/Byron.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ readByronGenesisConfig ::
1919
ExceptT SyncNodeError IO Byron.Config
2020
readByronGenesisConfig enc = do
2121
let file = unGenesisFile $ dncByronGenesisFile enc
22-
cs = mkSyncNodeCallStack "readByronGenesisConfig"
2322
genHash <-
24-
firstExceptT (SNErrDefault cs)
23+
firstExceptT (SNErrDefault mkSyncNodeCallStack)
2524
. hoistEither
2625
$ decodeAbstractHash (unGenesisHashByron $ dncByronGenesisHash enc)
2726
firstExceptT (SNErrByronConfig file) $

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ validateConsistentLevel syncEnv stPoint = do
139139
where
140140
compareTips _ dbTip Unchecked =
141141
logAndThrowIO tracer $
142-
SNErrDatabaseValConstLevel $
142+
SNErrDbSessionErrValConstLevel $
143143
"Found Unchecked Consistent Level. " <> showContext dbTip Unchecked
144144
compareTips (Point Origin) Nothing Consistent = pure ()
145145
compareTips (Point Origin) _ DBAheadOfLedger = pure ()
@@ -151,7 +151,7 @@ validateConsistentLevel syncEnv stPoint = do
151151
| blockPointSlot blk <= bSlotNo tip = pure ()
152152
compareTips _ dbTip cLevel =
153153
logAndThrowIO tracer $
154-
SNErrDatabaseValConstLevel $
154+
SNErrDbSessionErrValConstLevel $
155155
"Unexpected Consistent Level. " <> showContext dbTip cLevel
156156

157157
tracer = getTrace syncEnv

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

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
module Cardano.DbSync.DbEvent (
66
DbEvent (..),
77
ThreadChannels (..),
8-
liftFail,
9-
liftFailEither,
10-
liftDbError,
8+
liftDbSession,
9+
liftDbLookup,
10+
liftDbSessionEither,
11+
liftDbLookupEither,
12+
liftSessionIO,
1113
acquireDbConnection,
1214
blockingFlushDbEventQueue,
1315
lengthDbEventQueue,
@@ -104,9 +106,9 @@ data ThreadChannels = ThreadChannels
104106
-- let dbAction = runExceptT exceptTAction
105107
-- eResult <- liftIO $ try $ DB.runDbDirectLogged tracer dbEnv dbAction
106108
-- case eResult of
107-
-- Left (dbErr :: DB.DbError) -> do
109+
-- Left (dbErr :: DB.DbSessionError) -> do
108110
-- let cs = mkSyncNodeCallStack "runDbSyncTransaction"
109-
-- pure $ Left $ SNErrDatabase cs dbErr
111+
-- pure $ Left $ SNErrDbSessionErr mkSyncNodeCallStack dbErr
110112
-- Right appResult -> pure appResult
111113
runDbSyncTransaction ::
112114
forall m a.
@@ -117,13 +119,12 @@ runDbSyncTransaction ::
117119
m (Either SyncNodeError a)
118120
runDbSyncTransaction tracer dbEnv exceptTAction = do
119121
-- OUTER TRY: Catch any exceptions from the entire database operation
120-
-- This includes connection errors, DB.DbError exceptions thrown from runDbTransLogged,
122+
-- This includes connection errors, DB.DbSessionError exceptions thrown from runDbTransLogged,
121123
-- or any other unexpected exceptions during database access
122124
eResult <- liftIO $ try $ DB.runDbTransLogged tracer dbEnv (runExceptT exceptTAction)
123125
case eResult of
124-
Left (dbErr :: DB.DbError) -> do
125-
let cs = mkSyncNodeCallStack "runDbSyncTransaction"
126-
pure $ Left $ SNErrDatabase cs dbErr
126+
Left (dbErr :: DB.DbSessionError) -> do
127+
pure $ Left $ SNErrDbSessionErr mkSyncNodeCallStack dbErr
127128
Right appResult -> pure appResult
128129

129130
runDbSyncTransactionNoLogging ::
@@ -136,9 +137,8 @@ runDbSyncTransactionNoLogging dbEnv exceptTAction = do
136137
let dbAction = runExceptT exceptTAction
137138
eResult <- liftIO $ try $ DB.runDbTransSilent dbEnv dbAction
138139
case eResult of
139-
Left (dbErr :: DB.DbError) -> do
140-
let cs = mkSyncNodeCallStack "runDbSyncTransactionNoLogging"
141-
pure $ Left $ SNErrDatabase cs dbErr
140+
Left (dbErr :: DB.DbSessionError) -> do
141+
pure $ Left $ SNErrDbSessionErr mkSyncNodeCallStack dbErr
142142
Right appResult -> pure appResult
143143

144144
runDbSyncNoTransaction ::
@@ -151,9 +151,8 @@ runDbSyncNoTransaction ::
151151
runDbSyncNoTransaction tracer dbEnv exceptTAction = do
152152
eResult <- liftIO $ try $ DB.runDbDirectLogged tracer dbEnv (runExceptT exceptTAction)
153153
case eResult of
154-
Left (dbErr :: DB.DbError) -> do
155-
let cs = mkSyncNodeCallStack "runDbSyncNoTransaction"
156-
pure $ Left $ SNErrDatabase cs dbErr
154+
Left (dbErr :: DB.DbSessionError) -> do
155+
pure $ Left $ SNErrDbSessionErr mkSyncNodeCallStack dbErr
157156
Right appResult -> pure appResult
158157

159158
runDbSyncNoTransactionNoLogging ::
@@ -166,9 +165,8 @@ runDbSyncNoTransactionNoLogging dbEnv exceptTAction = do
166165
let dbAction = runExceptT exceptTAction
167166
eResult <- liftIO $ try $ DB.runDbDirectSilent dbEnv dbAction
168167
case eResult of
169-
Left (dbErr :: DB.DbError) -> do
170-
let cs = mkSyncNodeCallStack "runDbSyncNoTransactionNoLogging"
171-
pure $ Left $ SNErrDatabase cs dbErr
168+
Left (dbErr :: DB.DbSessionError) -> do
169+
pure $ Left $ SNErrDbSessionErr mkSyncNodeCallStack dbErr
172170
Right appResult -> pure appResult
173171

174172
-- | Execute database operations in a single transaction using the connection pool
@@ -182,45 +180,61 @@ runDbSyncTransactionPool tracer dbEnv exceptTAction = do
182180
let dbAction = runExceptT exceptTAction
183181
eResult <- liftIO $ try $ DB.runDbPoolTransLogged tracer dbEnv dbAction -- Use pool
184182
case eResult of
185-
Left (dbErr :: DB.DbError) -> do
186-
let cs = mkSyncNodeCallStack "runDbSyncTransactionPool"
187-
pure $ Left $ SNErrDatabase cs dbErr
183+
Left (dbErr :: DB.DbSessionError) -> do
184+
pure $ Left $ SNErrDbSessionErr mkSyncNodeCallStack dbErr
188185
Right appResult -> pure appResult
189186

190-
liftFail :: SyncNodeCallStack -> DB.DbM (Either DB.DbError a) -> ExceptT SyncNodeError DB.DbM a
191-
liftFail cs dbAction = do
187+
liftDbSession :: SyncNodeCallStack -> DB.DbM (Either DB.DbSessionError a) -> ExceptT SyncNodeError DB.DbM a
188+
liftDbSession cs dbAction = do
192189
result <- lift dbAction
193190
case result of
194-
Left dbErr -> throwError $ SNErrDatabase cs dbErr
191+
Left dbErr -> throwError $ SNErrDbSessionErr cs dbErr
195192
Right val -> pure val
196193

197-
liftFailEither :: SyncNodeCallStack -> ExceptT SyncNodeError DB.DbM (Either DB.DbError a) -> ExceptT SyncNodeError DB.DbM a
198-
liftFailEither cs mResult = do
194+
-- | Helper function to lift DbLookupError to SyncNodeError (similar to liftDbSession)
195+
liftDbLookup :: SyncNodeCallStack -> DB.DbM (Either DB.DbLookupError a) -> ExceptT SyncNodeError DB.DbM a
196+
liftDbLookup cs dbAction = do
197+
result <- lift dbAction
198+
case result of
199+
Left dbErr -> throwError $ SNErrDbLookupError cs dbErr
200+
Right val -> pure val
201+
202+
liftDbSessionEither :: SyncNodeCallStack -> ExceptT SyncNodeError DB.DbM (Either DB.DbSessionError a) -> ExceptT SyncNodeError DB.DbM a
203+
liftDbSessionEither cs mResult = do
204+
resultE <- lift $ runExceptT mResult
205+
case resultE of
206+
Left err -> throwError $ SNErrDefault cs (show err)
207+
Right result -> case result of
208+
Left dbErr -> throwError $ SNErrDbSessionErr cs dbErr
209+
Right val -> pure val
210+
211+
liftDbLookupEither :: SyncNodeCallStack -> ExceptT SyncNodeError DB.DbM (Either DB.DbLookupError a) -> ExceptT SyncNodeError DB.DbM a
212+
liftDbLookupEither cs mResult = do
199213
resultE <- lift $ runExceptT mResult
200214
case resultE of
201215
Left err -> throwError $ SNErrDefault cs (show err)
202216
Right result -> case result of
203-
Left dbErr -> throwError $ SNErrDatabase cs dbErr
217+
Left dbErr -> throwError $ SNErrDbLookupError cs dbErr
204218
Right val -> pure val
205219

206-
liftDbError :: ExceptT DB.DbError IO a -> ExceptT SyncNodeError IO a
207-
liftDbError dbAction = do
220+
liftSessionIO :: SyncNodeCallStack -> ExceptT DB.DbSessionError IO a -> ExceptT SyncNodeError IO a
221+
liftSessionIO cs dbAction = do
208222
result <- liftIO $ runExceptT dbAction
209223
case result of
210-
Left dbErr -> throwError $ SNErrDatabase (mkSyncNodeCallStack "liftDbError") dbErr
224+
Left dbErr -> throwError $ SNErrDbSessionErr cs dbErr
211225
Right val -> pure val
212226

213227
acquireDbConnection :: [HsqlSet.Setting] -> IO HsqlC.Connection
214228
acquireDbConnection settings = do
215229
result <- HsqlC.acquire settings
216230
case result of
217-
Left connErr -> throwIO $ SNErrDatabase (mkSyncNodeCallStack "acquireDbConnection") $ DB.DbError (show connErr)
231+
Left connErr -> throwIO $ SNErrDbSessionErr mkSyncNodeCallStack $ DB.mkDbSessionError (show connErr)
218232
Right conn -> pure conn
219233

220234
mkDbApply :: CardanoBlock -> DbEvent
221235
mkDbApply = DbApplyBlock
222236

223-
-- | This simulates a synhronous operations, since the thread waits for the db
237+
-- | This simulates a synchronous operations, since the thread waits for the db
224238
-- worker thread to finish the rollback.
225239
waitRollback :: ThreadChannels -> CardanoPoint -> Tip CardanoBlock -> IO (Maybe [CardanoPoint], Point.WithOrigin BlockNo)
226240
waitRollback tc point serverTip = do
@@ -252,7 +266,7 @@ newThreadChannels =
252266
writeDbEventQueue :: ThreadChannels -> DbEvent -> STM ()
253267
writeDbEventQueue = TBQ.writeTBQueue . tcQueue
254268

255-
-- | Block if the queue is empty and if its not read/flush everything.
269+
-- | Block if the queue is empty and if it's not read/flush everything.
256270
-- Need this because `flushTBQueue` never blocks and we want to block until
257271
-- there is one item or more.
258272
-- Use this instead of STM.check to make sure it blocks if the queue is empty.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ insertListBlocksWithStopCondition syncEnv blocks targetBlock = do
8181
"Reached stop condition at block "
8282
<> textShow targetBlock
8383
<> ". Stopping db-sync gracefully."
84-
pure $ Left $ SNErrDefault (mkSyncNodeCallStack "insertListBlocks") "Stop condition reached"
84+
pure $ Left $ SNErrDefault mkSyncNodeCallStack "Stop condition reached"
8585
_ -> pure result
8686

8787
applyAndInsertBlockMaybe ::

0 commit comments

Comments
 (0)