erigon-pulse/cmd/devnettest/commands/tx.go
leonardchinonso d0322ab840
Added eth_getTransactionCount to the devnet tool (#3734)
* Added eth_getTransactionCount to the devnet tool

* Fixed lint errors
2022-03-18 11:57:23 +00:00

26 lines
539 B
Go

package commands
import (
"fmt"
"github.com/ledgerwatch/erigon/cmd/devnettest/requests"
"github.com/ledgerwatch/erigon/cmd/devnettest/services"
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(txPoolCmd)
}
var txPoolCmd = &cobra.Command{
Use: "txpool-content",
Short: "Gets content of txpool",
Run: func(cmd *cobra.Command, args []string) {
if clearDev {
defer services.ClearDevDB()
}
if err := requests.TxpoolContent(reqId); err != nil {
fmt.Printf("error getting txpool content: %v\n", err)
}
},
}