Skip to content

Commit b3d7412

Browse files
committed
Fixup consensus databases paths when completing config
1 parent 5c37efc commit b3d7412

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

cabal.project

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,23 @@ allow-newer:
6767
source-repository-package
6868
type: git
6969
location: https://github.com/intersectmbo/cardano-cli.git
70-
tag: 6c8fd34e3faaf6c9b8f592a48941ec67fe5b2f65
71-
--sha256: sha256-ZVwWBUed/Y+U1gzUfdl39r3V7kypbl3SRlCkEQQcaLA=
70+
tag: 6691afc0a51e16b98236f85fda4e8d6b49174370
71+
--sha256: sha256-TDHJeC+chGZJsIgRUpw2hZuLErktkxIfFbc+WHFHn0k=
7272
subdir: cardano-cli
7373

7474
source-repository-package
7575
type: git
7676
location: https://github.com/IntersectMBO/cardano-api
77-
tag: 23f57762c5cc6a4d965b9eac5caaab786d3d9f51
78-
--sha256: sha256-7KmcH9JiK1+3h/hTP+4TMA41jqgUGwYQ7liBPB2iQA8=
77+
tag: 58941c7b1e71be38a3ba63a1b815ac386574287e
78+
--sha256: sha256-D/+yB+jclri/K5XPrM+ygBrN5bUizamX+zNeE5AqWpI=
7979
subdir:
8080
cardano-api
8181

8282
source-repository-package
8383
type: git
8484
location: https://github.com/IntersectMBO/ouroboros-consensus
85-
tag: fd423c545f38ede5f5ffc1d7cc56c006818392fa
86-
--sha256: sha256-iIDQBnR63QZas71KrgD9usf5SEh0AALTMdVJSl2YRvg=
85+
tag: 41f32e52644aa168c4f4d4ef645ed6c3ec2ecfd6
86+
--sha256: sha256-4ukkuRURJ24nXN+sfbFrDr0aYc1SPFvQO0XCVJuQris=
8787
subdir:
8888
ouroboros-consensus
8989
ouroboros-consensus-cardano
@@ -132,8 +132,8 @@ source-repository-package
132132
source-repository-package
133133
type: git
134134
location: https://github.com/IntersectMBO/lsm-tree
135-
tag: 96474ce9559573698095229d8d08bd1a95b7ae01
136-
--sha256: sha256-5Tk4kVP6U0MuPHjRNal9XFFz6TgHBoFOhGCzEYrV3v4=
135+
tag: 3c51ea5ac6400f32a7bdf17260325d4d0a360a98
136+
--sha256: sha256-44SHqtAciPhoI6ysLt8RdNvlVvN91GWHMnr68vOU2gQ=
137137
subdir:
138138
lsm-tree
139139
blockio

cardano-node/src/Cardano/Node/Configuration/POM.hs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import Cardano.Tracing.Config
3838
import Cardano.Tracing.OrphanInstances.Network ()
3939
import Ouroboros.Consensus.Ledger.SupportsMempool
4040
import Ouroboros.Consensus.Mempool (MempoolCapacityBytesOverride (..))
41-
import Ouroboros.Consensus.Node (NodeDatabasePaths (..))
41+
import Ouroboros.Consensus.Node (NodeDatabasePaths (..), nonImmutableDbPath)
4242
import Ouroboros.Consensus.Node.Genesis (GenesisConfig, GenesisConfigFlags,
4343
defaultGenesisConfigFlags, mkGenesisConfig)
4444
import Ouroboros.Consensus.Storage.LedgerDB.Args (QueryBatchSize (..))
@@ -759,9 +759,6 @@ makeNodeConfiguration pnc = do
759759
ncConsensusMode <-
760760
lastToEither "Missing ConsensusMode"
761761
$ pncConsensusMode pnc
762-
ncLedgerDbConfig <-
763-
lastToEither "Missing LedgerDb config"
764-
$ pncLedgerDbConfig pnc
765762
ncProtocolIdleTimeout <-
766763
lastToEither "Missing ProtocolIdleTimeout"
767764
$ pncProtocolIdleTimeout pnc
@@ -798,6 +795,17 @@ makeNodeConfiguration pnc = do
798795

799796
ncResponderCoreAffinityPolicy <- lastToEither "Missing ResponderCoreAffinityPolicy" $ pncResponderCoreAffinityPolicy pnc
800797

798+
let
799+
fixupConsensusDbPath (LedgerDbConfiguration ds si qbs (V1LMDB ff Nothing mg mi) dopt) =
800+
LedgerDbConfiguration ds si qbs (V1LMDB ff (Just $ nonImmutableDbPath databaseFile </> "lmdb") mg mi) dopt
801+
fixupConsensusDbPath (LedgerDbConfiguration ds si qbs (V2LSM Nothing) dopt) =
802+
LedgerDbConfiguration ds si qbs (V2LSM (Just $ nonImmutableDbPath databaseFile </> "lsm")) dopt
803+
fixupConsensusDbPath l = l
804+
805+
ncLedgerDbConfig <-
806+
fixupConsensusDbPath
807+
<$> lastToEither "Missing LedgerDb config" (pncLedgerDbConfig pnc)
808+
801809
let deadlineTargets =
802810
PeerSelectionTargets {
803811
targetNumberOfRootPeers = ncDeadlineTargetOfRootPeers,

0 commit comments

Comments
 (0)