2022-02-12 11:40:19 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
2022-03-17 20:16:02 +00:00
|
|
|
"fmt"
|
2022-02-12 11:40:19 +00:00
|
|
|
"github.com/ledgerwatch/erigon/cmd/devnettest/requests"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.AddCommand(mockRequestCmd)
|
|
|
|
}
|
|
|
|
|
|
|
|
var mockRequestCmd = &cobra.Command{
|
|
|
|
Use: "mock",
|
|
|
|
Short: "Mocks a request on the devnet",
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
2022-05-26 12:08:25 +00:00
|
|
|
callMockGetRequest()
|
2022-02-12 11:40:19 +00:00
|
|
|
},
|
|
|
|
}
|
2022-05-26 12:08:25 +00:00
|
|
|
|
|
|
|
func callMockGetRequest() {
|
|
|
|
if err := requests.MockGetRequest(reqId); err != nil {
|
|
|
|
fmt.Printf("error mocking get request: %v\n", err)
|
|
|
|
}
|
|
|
|
}
|