diff --git a/cmd-x-index-cid2subsetoffset.go b/cmd-x-index-cid2subsetoffset.go index e114ffc4..a8926f10 100644 --- a/cmd-x-index-cid2subsetoffset.go +++ b/cmd-x-index-cid2subsetoffset.go @@ -90,19 +90,19 @@ func newCmd_Index_cid2subsetOffset() *cli.Command { panic(err) } klog.Info("Index created") - // if verify { - // klog.Infof("Verifying index located at %s", indexFilepath) - // startedAt := time.Now() - // defer func() { - // klog.Infof("Finished in %s", time.Since(startedAt)) - // }() - // err := VerifyIndex_cid2subsetOffset(context.TODO(), indexFilepath) - // if err != nil { - // return cli.Exit(err, 1) - // } - // klog.Info("Index verified") - // return nil - // } + if verify { + klog.Infof("Verifying index located at %s", indexFilepath) + startedAt := time.Now() + defer func() { + klog.Infof("Finished in %s", time.Since(startedAt)) + }() + err := VerifyIndex_cid2subsetOffset(context.TODO(), carPaths, indexFilepath) + if err != nil { + return cli.Exit(err, 1) + } + klog.Info("Index verified") + return nil + } } return nil }, diff --git a/cmd-x-index.go b/cmd-x-index.go index 58e58fc1..e6c30e71 100644 --- a/cmd-x-index.go +++ b/cmd-x-index.go @@ -15,6 +15,7 @@ func newCmd_Index() *cli.Command { Flags: []cli.Flag{}, Subcommands: []*cli.Command{ newCmd_Index_cid2offset(), + newCmd_Index_cid2subsetOffset(), newCmd_Index_slot2cid(), newCmd_Index_sig2cid(), newCmd_Index_all(), // NOTE: not actually all.