gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
842 stars 343 forks source link

fix(gno.land/Makefile): lazily start gnoland node #2293

Closed harry-hov closed 3 weeks ago

harry-hov commented 3 weeks ago

start.gnoland fails as it requires config, genesis,... to be created manually in order to start the node.

Since this is for development purpose. Let's run gnoland start with -lazy flag.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 54.63%. Comparing base (dbfdbf7) to head (df06700).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2293 +/- ## ======================================= Coverage 54.63% 54.63% ======================================= Files 578 578 Lines 77877 77877 ======================================= Hits 42545 42545 Misses 32160 32160 Partials 3172 3172 ``` | [Flag](https://app.codecov.io/gh/gnolang/gno/pull/2293/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | Coverage Δ | | |---|---|---| | [gno.land](https://app.codecov.io/gh/gnolang/gno/pull/2293/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `61.65% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ltzmaxwell commented 3 weeks ago

do you think autoConfig or something similar is a better name?

It's a mostly a personal preference: lazy init, as an optimization initialization strategy, can be always used as a default. So the form could be like this:

if c.autoConfig{
    initNodeDir()
}

func initNodeDir(){
    if !exists{
        //  init logic
    }
}