Help us shape the future of Go! Take the 2026 Go Developer Survey

fork

package
v0.1.113 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ForkCmd = &cobra.Command{
	Use:   "fork blockhash url",
	Short: "Take a forked block and walk up the chain to do analysis.",
	Long:  "",
	Args:  cobra.ExactArgs(2),
	PreRunE: func(cmd *cobra.Command, args []string) error {
		blockHash = ethcommon.HexToHash(args[0])
		rpcURL = args[1]
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) error {
		log.Info().Str("rpc", rpcURL).Str("blockHash", blockHash.String()).Msg("Starting Analysis")
		c, err := ethclient.Dial(rpcURL)
		if err != nil {
			log.Error().Err(err).Str("rpc", rpcURL).Msg("Could not rpc dial connection")
			return err
		}
		return walkTheBlocks(blockHash, c)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL