Skip to content

Commit

Permalink
Fix lint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
eljobe committed May 30, 2024
1 parent d19b12e commit c295c88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion validator/client/validation_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ func (c *ExecutionClient) LatestWasmModuleRoot() containers.PromiseInterface[com

func (c *ExecutionClient) WriteToFile(input *validator.ValidationInput, expOut validator.GoGlobalState, moduleRoot common.Hash) containers.PromiseInterface[struct{}] {
jsonInput := server_api.ValidationInputToJson(input)
jsonInput.WriteToFile()
if err := jsonInput.WriteToFile(); err != nil {
return stopwaiter.LaunchPromiseThread[struct{}](c, func(ctx context.Context) (struct{}, error) {
return struct{}{}, err
})
}
return stopwaiter.LaunchPromiseThread[struct{}](c, func(ctx context.Context) (struct{}, error) {
err := c.client.CallContext(ctx, nil, server_api.Namespace+"_writeToFile", jsonInput, expOut, moduleRoot)
return struct{}{}, err
Expand Down
2 changes: 1 addition & 1 deletion validator/server_api/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (i *InputJSON) WriteToFile() error {
if err != nil {
return err
}
if err = os.WriteFile(fmt.Sprintf("block_inputs_%d.json", i.Id), contents, 0644); err != nil {
if err = os.WriteFile(fmt.Sprintf("block_inputs_%d.json", i.Id), contents, 0600); err != nil {
return err
}
return nil
Expand Down

0 comments on commit c295c88

Please sign in to comment.