Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemadero committed Dec 20, 2022
1 parent d986e5c commit 583c5b6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 5 additions & 7 deletions local/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,8 @@ func (ln *localNetwork) installCustomChains(
if err != nil {
return nil, err
}
blockchainFilesCreated, err := ln.setBlockchainConfigFiles(chainSpecs, blockchainTxs, ln.log)
if err != nil {
return nil, err
}

blockchainFilesCreated := ln.setBlockchainConfigFiles(chainSpecs, blockchainTxs, ln.log)

if numSubnetsToCreate > 0 || blockchainFilesCreated {
// we need to restart if there are new subnets or if there are new network config files
Expand Down Expand Up @@ -775,7 +773,7 @@ func (ln *localNetwork) setBlockchainConfigFiles(
chainSpecs []network.BlockchainSpec,
blockchainTxs []*txs.Tx,
log logging.Logger,
) (bool, error) {
) bool {
fmt.Println()
created := false
log.Info(logging.Green.Wrap("creating config files for each custom chain"))
Expand All @@ -802,13 +800,13 @@ func (ln *localNetwork) setBlockchainConfigFiles(
}
if chainSpec.SubnetConfig != nil {
created = true
ln.subnetConfigFiles[*chainSpec.SubnetId] = string(chainSpec.SubnetConfig)
ln.subnetConfigFiles[*chainSpec.SubnetID] = string(chainSpec.SubnetConfig)
for nodeName := range ln.nodes {
delete(ln.nodes[nodeName].config.SubnetConfigFiles, *chainSpec.SubnetID)
}
}
}
return created, nil
return created
}

func (*localNetwork) createBlockchains(
Expand Down
4 changes: 2 additions & 2 deletions network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ var (
)

type BlockchainSpec struct {
VmName string
VMName string
Genesis []byte
SubnetId *string
SubnetID *string
ChainConfig []byte
NetworkUpgrade []byte
SubnetConfig []byte
Expand Down
4 changes: 2 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,12 @@ func getNetworkBlockchainSpec(
}
}
return network.BlockchainSpec{
VmName: vmName,
VMName: vmName,
Genesis: genesisBytes,
ChainConfig: chainConfigBytes,
NetworkUpgrade: networkUpgradeBytes,
SubnetConfig: subnetConfigBytes,
SubnetId: spec.SubnetId,
SubnetID: spec.SubnetId,
BlockchainAlias: spec.BlockchainAlias,
PerNodeChainConfig: perNodeChainConfig,
}, nil
Expand Down

0 comments on commit 583c5b6

Please sign in to comment.