Skip to content

Commit

Permalink
refactor(network): remove unused NoCheck for publish (#3112)
Browse files Browse the repository at this point in the history
* remove no check option

* refactor cmd

* remove noCheck field
  • Loading branch information
lumtis authored Nov 15, 2022
1 parent a572663 commit 36974ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
9 changes: 5 additions & 4 deletions ignite/cmd/network_chain_publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,11 @@ func networkChainPublishHandler(cmd *cobra.Command, args []string) error {
return err
}

if noCheck {
publishOptions = append(publishOptions, network.WithNoCheck())
} else if err := c.Init(cmd.Context(), cacheStorage); err != nil { // initialize the chain for checking.
return fmt.Errorf("blockchain init failed: %w", err)
if !noCheck {
if err := c.Init(cmd.Context(), cacheStorage); err != nil {
// initialize the chain for checking.
return fmt.Errorf("blockchain init failed: %w", err)
}
}

session.StartSpinner("Publishing...")
Expand Down
8 changes: 0 additions & 8 deletions ignite/services/network/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type publishOptions struct {
genesisConfig string
chainID string
campaignID uint64
noCheck bool
metadata string
totalSupply sdk.Coins
sharePercentages SharePercents
Expand All @@ -47,13 +46,6 @@ func WithChainID(chainID string) PublishOption {
}
}

// WithNoCheck disables checking integrity of the chain.
func WithNoCheck() PublishOption {
return func(o *publishOptions) {
o.noCheck = true
}
}

// WithCustomGenesisURL enables using a custom genesis during publish.
func WithCustomGenesisURL(url string) PublishOption {
return func(o *publishOptions) {
Expand Down

0 comments on commit 36974ff

Please sign in to comment.