Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve globals of smart contracts into account state. #151

Merged
merged 2 commits into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
245 changes: 0 additions & 245 deletions cmd/wavelet/cli.go

This file was deleted.

41 changes: 0 additions & 41 deletions cmd/wavelet/completion.go

This file was deleted.

34 changes: 11 additions & 23 deletions cmd/wavelet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,7 @@ type Config struct {
}

func main() {
log.SetWriter(
log.LoggerWavelet,
log.NewConsoleWriter(nil, log.FilterFor(
log.ModuleNode,
log.ModuleNetwork,
log.ModuleSync,
log.ModuleConsensus,
log.ModuleContract,
)),
)

log.SetWriter(log.LoggerWavelet, log.NewConsoleWriter(nil, log.FilterFor(log.ModuleNode, log.ModuleNetwork, log.ModuleSync, log.ModuleConsensus, log.ModuleContract)))
logger := log.Node()

app := cli.NewApp()
Expand Down Expand Up @@ -176,15 +166,13 @@ func main() {
}

// apply the toml before processing the flags
app.Before = altsrc.InitInputSourceWithContext(
app.Flags, func(c *cli.Context) (altsrc.InputSourceContext, error) {
filePath := c.String("config")
if len(filePath) > 0 {
return altsrc.NewTomlSourceFromFile(filePath)
}
return &altsrc.MapInputSource{}, nil
},
)
app.Before = altsrc.InitInputSourceWithContext(app.Flags, func(c *cli.Context) (altsrc.InputSourceContext, error) {
filePath := c.String("config")
if len(filePath) > 0 {
return altsrc.NewTomlSourceFromFile(filePath)
}
return &altsrc.MapInputSource{}, nil
})

cli.VersionPrinter = func(c *cli.Context) {
fmt.Printf("Version: %s\n", c.App.Version)
Expand Down Expand Up @@ -228,9 +216,9 @@ func main() {
sort.Sort(cli.FlagsByName(app.Flags))
sort.Sort(cli.CommandsByName(app.Commands))

if err := app.Run(os.Args); err != nil {
logger.Fatal().Err(err).
Msg("Failed to parse configuration/command-line arguments.")
err := app.Run(os.Args)
if err != nil {
logger.Fatal().Err(err).Msg("Failed to parse configuration/command-line arguments.")
}
}

Expand Down
Loading