Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Jul 31, 2024
1 parent 9b10eab commit 20e8ee6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions packages/taiko-client/preconfapi/preconfapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ func (p *PreconfAPI) poll() error {
log.Info("found tx", "hash", tx.Hash().Hex())
if err := p.db.Update(func(txn *badger.Txn) error {
_, err := txn.Get(tx.Hash().Bytes())
// if err == nil {
// log.Info("seen tx before", "hash", tx.Hash().Hex())
// return nil
// }
if err == nil {
log.Info("seen tx before", "hash", tx.Hash().Hex())
return nil
}

log.Info("havent seen tx before", "hash", tx.Hash().Hex())

Expand Down
4 changes: 2 additions & 2 deletions packages/taiko-client/preconfapi/server/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ func (s *PreconfAPIServer) GetTransactionByHash(c echo.Context) error {

return nil
}); err != nil {
return c.JSON(http.StatusNotFound, err)
return c.JSON(http.StatusNotFound, tx)
}

if tx == nil {
return c.JSON(http.StatusNotFound, nil)
return c.JSON(http.StatusNotFound, tx)
}

return c.JSON(http.StatusOK, tx)
Expand Down

0 comments on commit 20e8ee6

Please sign in to comment.