mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 02:31:19 +00:00
394adb4750
Former-commit-id: ad6a4793064556b556a92dbed3f8a555972c07a1 [formerly 13e903a723eee255b4eb6e2bcc7be06ba73b6fa7] Former-commit-id: b2ecf21d02170030dfc56e9d9303aeb7bee45fab
56 lines
1.7 KiB
Go
56 lines
1.7 KiB
Go
package main
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/sharding/collator"
|
|
//"github.com/ethereum/go-ethereum/sharding/proposer"
|
|
|
|
"github.com/ethereum/go-ethereum/cmd/utils"
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
)
|
|
|
|
var (
|
|
collatorClientCommand = cli.Command{
|
|
Action: utils.MigrateFlags(collatorClient),
|
|
Name: "sharding-collator",
|
|
Aliases: []string{"shard-collator"},
|
|
Usage: "Start a sharding collator client",
|
|
ArgsUsage: "[endpoint]",
|
|
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag, utils.IPCPathFlag, utils.DepositFlag},
|
|
Category: "SHARDING COMMANDS",
|
|
Description: `
|
|
Launches a sharding collator client that connects to a running geth node and submit collations to a Sharding Manager Contract. This feature is a work in progress.
|
|
`,
|
|
}
|
|
proposerClientCommand = cli.Command{
|
|
Action: utils.MigrateFlags(proposerClient),
|
|
Name: "sharding-proposer",
|
|
Aliases: []string{"shard-proposer"},
|
|
Usage: "Start a sharding proposer client",
|
|
ArgsUsage: "[endpoint]",
|
|
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag, utils.IPCPathFlag},
|
|
Category: "SHARDING COMMANDS",
|
|
Description: `
|
|
Launches a sharding proposer client that connects to a running geth node and proposes collations to collator node. This feature is a work in progress.
|
|
`,
|
|
}
|
|
)
|
|
|
|
func collatorClient(ctx *cli.Context) error {
|
|
c := collator.NewCollatorClient(ctx)
|
|
if err := collator.CollatorStart(c); err != nil {
|
|
return err
|
|
}
|
|
c.Wait()
|
|
return nil
|
|
}
|
|
|
|
func proposerClient(ctx *cli.Context) error {
|
|
/*p := proposer.NewProposerClient(ctx)
|
|
if err := proposer.ProposerStart(p); err != nil {
|
|
return err
|
|
}
|
|
p.Wait()
|
|
*/
|
|
return nil
|
|
}
|