Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandros Filios <[email protected]>
  • Loading branch information
alexandrosfilios committed Jan 22, 2025
1 parent 58ac99a commit 78b045b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions platform/view/services/db/driver/sql/common/signerinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (db *SignerInfoPersistence) FilterExistingSigners(ids ...view.Identity) ([]
}
where, params := Where(db.ci.InStrings("id", idHashes))
query := fmt.Sprintf("SELECT id FROM %s %s", db.table, where)
logger.Debug(query, params)
logger.Info(query, params)

rows, err := db.readDB.Query(query, params...)
if err != nil {
Expand All @@ -58,13 +58,13 @@ func (db *SignerInfoPersistence) FilterExistingSigners(ids ...view.Identity) ([]
}
existingSigners = append(existingSigners, inverseMap[idHash])
}
logger.Debugf("Found %d out of %d signers", len(existingSigners), len(ids))
logger.Infof("Found %d out of %d signers", len(existingSigners), len(ids))
return existingSigners, nil
}

func (db *SignerInfoPersistence) PutSigner(id view.Identity) error {
query := fmt.Sprintf("INSERT INTO %s (id) VALUES ($1)", db.table)
logger.Debugf(query, id)
logger.Info(query, id)
_, err := db.writeDB.Exec(query, id.UniqueID())
if err != nil && errors.Is(db.errorWrapper.WrapError(err), driver.UniqueKeyViolation) {
logger.Warnf("Signer [%s] already in db. Skipping...", id)
Expand All @@ -73,7 +73,7 @@ func (db *SignerInfoPersistence) PutSigner(id view.Identity) error {
if err != nil {
return errors.Wrapf(err, "failed executing query [%s]", query)
}
logger.Debugf("Signer [%s] registered", id)
logger.Infof("Signer [%s] registered", id)
return nil
}

Expand Down

0 comments on commit 78b045b

Please sign in to comment.