Skip to content

Commit e64b74c

Browse files
committed
fix admin tool for pebble checkpoint
1 parent 9282b2d commit e64b74c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cmd/scaffold.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,11 @@ func (fnb *FlowNodeBuilder) initProtocolDB() error {
10941094
return err
10951095
}
10961096

1097+
fnb.AdminCommand("create-pebble-checkpoint", func(config *NodeConfig) commands.AdminCommand {
1098+
// by default checkpoints will be created under "/data/protocol_pebble_checkpoints"
1099+
return storageCommands.NewPebbleDBCheckpointCommand(config.pebbleCheckpointsDir, "protocol", pebbleDB)
1100+
})
1101+
10971102
fnb.ProtocolDB = pebbleimpl.ToDB(pebbleDB)
10981103
fnb.ShutdownFunc(closer.Close)
10991104
return nil
@@ -2015,9 +2020,6 @@ func (fnb *FlowNodeBuilder) RegisterDefaultAdminCommands() {
20152020
return storageCommands.NewReadSealsCommand(config.State, config.Storage.Seals, config.Storage.Index)
20162021
}).AdminCommand("get-latest-identity", func(config *NodeConfig) commands.AdminCommand {
20172022
return common.NewGetIdentityCommand(config.IdentityProvider)
2018-
}).AdminCommand("create-pebble-checkpoint", func(config *NodeConfig) commands.AdminCommand {
2019-
// by default checkpoints will be created under "/data/protocol_pebble_checkpoints"
2020-
return storageCommands.NewPebbleDBCheckpointCommand(config.pebbleCheckpointsDir, "protocol", config.PebbleDB)
20212023
})
20222024
}
20232025

0 commit comments

Comments
 (0)