Skip to content

Commit

Permalink
add limit 1 to lastindexed and revert clients to localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoMaxPlanck committed Feb 20, 2023
1 parent 072192e commit a4adafc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion services/scribe/client/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NewEmbeddedScribe(database, path string) EmbeddedScribe {
return EmbeddedScribe{
ScribeClient: ScribeClient{
Port: uint16(freeport.GetPort()),
URL: "docker.for.mac.localhost",
URL: "localhost",
},
database: database,
path: path,
Expand Down
1 change: 1 addition & 0 deletions services/scribe/db/datastore/sql/base/lastindexed.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func (s Store) RetrieveLastIndexed(ctx context.Context, contractAddress common.A
ContractAddress: contractAddress.String(),
ChainID: chainID,
}).
Limit(1).
Scan(&entry)
if dbTx.RowsAffected == 0 {
logger.Warnf("no last indexed info found for contract %s on chain %d. Providing 0.", contractAddress.String(), chainID)
Expand Down

0 comments on commit a4adafc

Please sign in to comment.