fix tvx init.
This commit is contained in:
parent
5301c416bc
commit
39d9150175
@ -49,6 +49,8 @@ var extractCmd = &cli.Command{
|
||||
Name: "extract",
|
||||
Description: "generate a test vector by extracting it from a live chain",
|
||||
Action: runExtract,
|
||||
Before: initialize,
|
||||
After: destroy,
|
||||
Flags: []cli.Flag{
|
||||
&repoFlag,
|
||||
&cli.StringFlag{
|
||||
|
@ -43,6 +43,8 @@ var extractManyCmd = &cli.Command{
|
||||
after these compulsory seven.
|
||||
`,
|
||||
Action: runExtractMany,
|
||||
Before: initialize,
|
||||
After: destroy,
|
||||
Flags: []cli.Flag{
|
||||
&repoFlag,
|
||||
&cli.StringFlag{
|
||||
|
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"sort"
|
||||
@ -47,11 +48,6 @@ func main() {
|
||||
tvx extract-many performs a batch extraction of many messages, supplied in a
|
||||
CSV file. Refer to the help of that subcommand for more info.
|
||||
|
||||
tvx project projects an existing test vector against a different protocol
|
||||
version, reporting the result, optionally appending a new variant to the
|
||||
vector in place if deemed equivalent, or producing a new vector if
|
||||
non-equivalent.
|
||||
|
||||
tvx simulate takes a raw message and simulates it on top of the supplied
|
||||
epoch, reporting the result on stderr and writing a test vector on stdout
|
||||
or into the specified file.
|
||||
@ -80,8 +76,6 @@ func main() {
|
||||
extractManyCmd,
|
||||
simulateCmd,
|
||||
},
|
||||
Before: initialize,
|
||||
After: destroy,
|
||||
}
|
||||
|
||||
sort.Sort(cli.CommandsByName(app.Commands))
|
||||
@ -107,7 +101,9 @@ func initialize(c *cli.Context) error {
|
||||
|
||||
// Make the API client.
|
||||
var err error
|
||||
FullAPI, Closer, err = lcli.GetFullNodeAPI(c)
|
||||
if FullAPI, Closer, err = lcli.GetFullNodeAPI(c); err != nil {
|
||||
err = fmt.Errorf("failed to locate Lotus node; ")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -29,15 +29,19 @@ var simulateFlags struct {
|
||||
|
||||
var simulateCmd = &cli.Command{
|
||||
Name: "simulate",
|
||||
Description: "simulate a raw message on top of the supplied" +
|
||||
"epoch, reporting the result on stderr and writing a test vector on stdout" +
|
||||
Description: "simulate a raw message on top of the supplied epoch (or HEAD), " +
|
||||
"reporting the result on stderr and writing a test vector on stdout " +
|
||||
"or into the specified file",
|
||||
Action: runSimulateCmd,
|
||||
Before: initialize,
|
||||
After: destroy,
|
||||
Flags: []cli.Flag{
|
||||
&repoFlag,
|
||||
&cli.StringFlag{
|
||||
Name: "msg",
|
||||
Usage: "base64 cbor-encoded message",
|
||||
Destination: &simulateFlags.msg,
|
||||
Required: true,
|
||||
},
|
||||
&cli.Int64Flag{
|
||||
Name: "at-epoch",
|
||||
|
Loading…
Reference in New Issue
Block a user