@@ -79,13 +79,13 @@ func configure() error {
7979 blocksPerSlot = shrinkingmap .New [iotago.SlotIndex , []* blocks.Block ]()
8080 blocksPrunableStorage = prunable .NewBucketManager (database.Config {
8181 Engine : hivedb .EngineRocksDB ,
82- Directory : ParamsDebugAPI .Path ,
82+ Directory : ParamsDebugAPI .Database . Path ,
8383
8484 Version : 1 ,
8585 PrefixHealth : []byte {debugPrefixHealth },
8686 }, func (err error ) {
8787 Component .LogWarnf (">> DebugAPI Error: %s\n " , err )
88- }, prunable .WithMaxOpenDBs (ParamsDebugAPI .MaxOpenDBs ),
88+ }, prunable .WithMaxOpenDBs (ParamsDebugAPI .Database . MaxOpenDBs ),
8989 )
9090
9191 routeGroup := deps .RestRouteManager .AddRoute ("debug/v2" )
@@ -98,7 +98,7 @@ func configure() error {
9898
9999 deps .Protocol .Events .Engine .SlotGadget .SlotFinalized .Hook (func (index iotago.SlotIndex ) {
100100 epoch := deps .Protocol .APIForSlot (index ).TimeProvider ().EpochFromSlot (index )
101- if epoch < iotago .EpochIndex (ParamsDebugAPI .PruningThreshold ) {
101+ if epoch < iotago .EpochIndex (ParamsDebugAPI .Database . Pruning . Threshold ) {
102102 return
103103 }
104104
@@ -107,7 +107,7 @@ func configure() error {
107107 lastPruned ++
108108 }
109109
110- for i := lastPruned ; i < epoch - iotago .EpochIndex (ParamsDebugAPI .PruningThreshold ); i ++ {
110+ for i := lastPruned ; i < epoch - iotago .EpochIndex (ParamsDebugAPI .Database . Pruning . Threshold ); i ++ {
111111 if err := blocksPrunableStorage .Prune (i ); err != nil {
112112 Component .LogWarnf (">> DebugAPI Error: %s\n " , err )
113113 }
0 commit comments