Update cobra to require head
or historic
when using capture
.
This commit is contained in:
parent
055b81e879
commit
42923d15c1
14
README.md
14
README.md
@ -2,6 +2,19 @@
|
||||
|
||||
This application will capture all the `BeaconState`'s and `SignedBeaconBlock`'s from the consensus chain on Ethereum.
|
||||
|
||||
# Running the Application
|
||||
|
||||
To run the application, utilize the following command, and update the values as needed.
|
||||
|
||||
```
|
||||
go run main.go capture head --db.address localhost \
|
||||
--db.password password \
|
||||
--db.port 8077 \
|
||||
--db.username username \
|
||||
--lh.address localhost \
|
||||
--lh.port 5052
|
||||
```
|
||||
|
||||
# Contribution
|
||||
|
||||
If you want to contribute please make sure you do the following:
|
||||
@ -9,6 +22,7 @@ If you want to contribute please make sure you do the following:
|
||||
- Create a Github issue before starting your work.
|
||||
- Follow the branching structure.
|
||||
- Delete your branch once it has been merged.
|
||||
- Do not delete the `develop` branch. We can add branch protection once we make the branch public.
|
||||
|
||||
## Branching Structure
|
||||
|
||||
|
@ -5,24 +5,17 @@ Copyright © 2022 NAME HERE <EMAIL ADDRESS>
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// captureCmd represents the capture command
|
||||
var captureCmd = &cobra.Command{
|
||||
Use: "capture",
|
||||
Short: "A brief description of your command",
|
||||
Long: `A longer description that spans multiple lines and likely contains examples
|
||||
and usage of using your command. For example:
|
||||
|
||||
Cobra is a CLI library for Go that empowers applications.
|
||||
This application is a tool to generate the needed files
|
||||
to quickly create a Cobra application.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("capture called")
|
||||
},
|
||||
Short: "Capture the SignedBeaconBlocks and BeaconStates from the Beacon Chain",
|
||||
Long: `Capture SignedBeaconBlocks and BeaconStates from the Beacon Chain.
|
||||
These blocks and states will be captured in
|
||||
Postgres. They require a lighthouse client to be connected. You can run this to
|
||||
capture blocks and states at head or historic blocks.`,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -13,13 +13,8 @@ import (
|
||||
// headCmd represents the head command
|
||||
var headCmd = &cobra.Command{
|
||||
Use: "head",
|
||||
Short: "A brief description of your command",
|
||||
Long: `A longer description that spans multiple lines and likely contains examples
|
||||
and usage of using your command. For example:
|
||||
|
||||
Cobra is a CLI library for Go that empowers applications.
|
||||
This application is a tool to generate the needed files
|
||||
to quickly create a Cobra application.`,
|
||||
Short: "Capture only the blocks and state at head.",
|
||||
Long: `Capture only the blocks and state at head.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("head called")
|
||||
},
|
||||
|
@ -13,13 +13,8 @@ import (
|
||||
// historicCmd represents the historic command
|
||||
var historicCmd = &cobra.Command{
|
||||
Use: "historic",
|
||||
Short: "A brief description of your command",
|
||||
Long: `A longer description that spans multiple lines and likely contains examples
|
||||
and usage of using your command. For example:
|
||||
|
||||
Cobra is a CLI library for Go that empowers applications.
|
||||
This application is a tool to generate the needed files
|
||||
to quickly create a Cobra application.`,
|
||||
Short: "Capture the historic blocks and states.",
|
||||
Long: `Capture the historic blocks and states.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("historic called")
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user