Skip to content

Commit

Permalink
some debug logs removed
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Sep 6, 2024
1 parent bcfd31e commit 232ab25
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,9 @@ func (a *Account) FaucetPackage(toAddr string, amount uint64) (*models.FaucetPac

// ensureAccountExist checks if the account exists and creates it if it doesn't.
func ensureAccountExist(cli *apiclient.HTTPclient) error {
account, err := cli.Account("")
if err == nil {
log.Infow("account already exists", "address", account.Address)
if _, err := cli.Account(""); err == nil {
return nil
}
log.Infow("creating new account", "address", cli.MyAddress().Hex())
faucetPkg, err := apiclient.GetFaucetPackageFromDefaultService(cli.MyAddress().Hex(), cli.ChainID())
if err != nil {
return fmt.Errorf("failed to get faucet package: %w", err)
Expand Down
1 change: 0 additions & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func New(conf *APIConfig) *API {

// Start starts the API HTTP server (non blocking).
func (a *API) Start() {
log.Infof("starting API server on %s:%d", a.host, a.port)
go func() {
if err := http.ListenAndServe(fmt.Sprintf("%s:%d", a.host, a.port), a.initRouter()); err != nil {
log.Fatalf("failed to start the API server: %v", err)
Expand Down
4 changes: 1 addition & 3 deletions db/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ func New(url, database string) (*MongoStorage, error) {
// if reset flag is enabled, Reset drops the database documents and recreates indexes
// else, just init collections and create indexes
if reset := os.Getenv("VOCDONI_MONGO_RESET_DB"); reset != "" {
log.Info("resetting database")
err := ms.Reset()
if err != nil {
if err := ms.Reset(); err != nil {
return nil, err
}
} else {
Expand Down

0 comments on commit 232ab25

Please sign in to comment.