Skip to content

Commit 802bf83

Browse files
committed
#70 Adds task ID to Todo comments.
1 parent 98cbbfb commit 802bf83

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

cmd/lightchain/init.go

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ func newNodeCfgFromCmd(cmd *cobra.Command) (node.Config, setup.Network, error) {
7979
// This should be done inside of the `node.Init()` pkg but due to bad design,
8080
// creation of new Ethereum node instance from a config accidentally modifies the FS by creating
8181
// a keystore dir therefore we have to perform this check as early as possible.
82+
//
83+
// Todo: After #90 is done, move this code to `Node.Init()`
8284
if doesExist, err := fs.DirExists(dataDir); doesExist || err != nil {
8385
return node.Config{}, "", fmt.Errorf("unable to initialize lightchain node. %s already exists", dataDir)
8486
}

database/node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func NewNode(cfg *Config, consensusAPI conAPI.API, registry *prometheus.Registry
3434
return nil, err
3535
}
3636

37-
// Todo: Should be refactored, creating a new instance of a struct SHOULDN'T do any FS changes
37+
// Todo: #90 Should be refactored, creating a new instance of a struct SHOULDN'T do any FS changes
3838
cfg.GethCfg.EthCfg.NetworkId = cfg.GethCfg.EthCfg.Genesis.Config.ChainID.Uint64()
3939
ethereum, err := ethNode.New(&cfg.GethCfg.NodeCfg)
4040
if err != nil {

node/node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func NewNode(cfg *Config) (*Node, error) {
2929
return nil, err
3030
}
3131

32-
// Todo: Should be refactored, creating a new instance of a struct SHOULDN'T do any FS changes
32+
// Todo: #90 Should be refactored, creating a new instance of a struct SHOULDN'T do any FS changes
3333
conRPCAPI := conAPI.NewRPCApi(cfg.consensusCfg.RPCListenPort())
3434
logger.Debug("Creating new database node instance from config and creates a keystore dir...")
3535
dbNode, err := database.NewNode(&cfg.dbCfg, conRPCAPI, prometheusNode.Registry())

0 commit comments

Comments
 (0)