mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-05 10:32:19 +00:00
fdd385cef1
This is the beginning of the series of changes to make it possible to run multiple instances of erigon inside a single process (as devnet tool does), with the logging from these processes going to respective log files correctly. This is the first part where the initial infrastructure is being established --------- Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
28 lines
664 B
Go
28 lines
664 B
Go
package commands
|
|
|
|
import (
|
|
"github.com/ledgerwatch/erigon/cmd/state/verify"
|
|
"github.com/ledgerwatch/erigon/turbo/debug"
|
|
"github.com/ledgerwatch/log/v3"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
withDataDir(verifyTxLookupCmd)
|
|
rootCmd.AddCommand(verifyTxLookupCmd)
|
|
}
|
|
|
|
var verifyTxLookupCmd = &cobra.Command{
|
|
Use: "verifyTxLookup",
|
|
Short: "Generate tx lookup index",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
var logger log.Logger
|
|
var err error
|
|
if logger, err = debug.SetupCobra(cmd, "verify_txlookup"); err != nil {
|
|
logger.Error("Setting up", "error", err)
|
|
return err
|
|
}
|
|
return verify.ValidateTxLookups(chaindata, logger)
|
|
},
|
|
}
|