Skip to content

Commit 11947c3

Browse files
committed
Reject bootstrap-tx-out with LSM backend
1 parent 024fc3f commit 11947c3

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • cardano-db-sync/src/Cardano/DbSync

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,15 @@ mkSyncEnv metricSetters trce dbEnv syncOptions protoInfo nw maxLovelaceSupply nw
341341
else pure useNoCache
342342
consistentLevelVar <- newTVarIO Unchecked
343343
indexesVar <- newTVarIO $ enpForceIndexes syncNP
344-
bts <- getBootstrapInProgress trce (isTxOutConsumedBootstrap' syncNodeConfigFromFile) dbEnv
344+
let bootstrapFlag = isTxOutConsumedBootstrap' syncNodeConfigFromFile
345+
case (bootstrapFlag, dncLedgerBackend syncNodeConfigFromFile) of
346+
(True, LedgerBackendLSM _) ->
347+
DB.logAndThrowIO trce $
348+
"bootstrap-tx-out is not supported with ledger_backend=lsm. "
349+
<> "The bootstrap path reads the full UTxO from the in-memory ledger state, "
350+
<> "which is empty under LSM. Use ledger_backend=inmemory or disable bootstrap."
351+
_ -> pure ()
352+
bts <- getBootstrapInProgress trce bootstrapFlag dbEnv
345353
bootstrapVar <- newTVarIO bts
346354
-- Offline Pool + Anchor queues
347355
opwq <- newTBQueueIO 1000

0 commit comments

Comments
 (0)