Skip to content

Commit

Permalink
chore: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoura committed Sep 9, 2024
1 parent cf978c5 commit 1dab403
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
3 changes: 1 addition & 2 deletions internal/evmreader/inputsource_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ func (i *InputSourceAdapter) RetrieveInputs(
inputAddedEvent := itr.Event
events = append(events, *inputAddedEvent)
}
err = itr.Error()
if err != nil {
if err = itr.Error(); err != nil {
return nil, err
}
return events, nil
Expand Down
8 changes: 3 additions & 5 deletions internal/repository/evmreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ func (pg *Database) StoreEpochAndInputsTransaction(
@appAddress,
@epochId)
RETURNING
id
`
id`

updateLastBlockQuery := `
UPDATE application
Expand Down Expand Up @@ -178,12 +177,11 @@ func (pg *Database) getAllApplicationsByStatus(
status,
iconsensus_address
FROM
application
`
application`

var args []any
if criteria != nil {
query = query + "WHERE status=$1"
query = query + " WHERE status=$1"
args = append(args, string(*criteria))
}

Expand Down
16 changes: 8 additions & 8 deletions internal/repository/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (pg *Database) GetOutputsProducedInBlockRange(
endBlock uint64,
) ([]Output, error) {
query := `
SELECT
SELECT
o.id,
o.index,
o.raw_data,
Expand Down Expand Up @@ -89,9 +89,9 @@ func (pg *Database) GetProcessedEpochs(ctx context.Context, application Address)
claim_hash,
transaction_hash,
status
FROM
FROM
epoch
WHERE
WHERE
application_address=@appAddress AND status=@status
ORDER BY
index ASC`
Expand Down Expand Up @@ -167,7 +167,7 @@ func (pg *Database) GetLastInputOutputsHash(
query := `
SELECT
outputs_hash
FROM
FROM
input
WHERE
epoch_id = @id
Expand Down Expand Up @@ -274,7 +274,7 @@ func (pg *Database) SetEpochClaimAndInsertProofsTransaction(
SET
claim_hash=@claimHash,
status=@status
WHERE
WHERE
id = @id
`

Expand Down Expand Up @@ -303,12 +303,12 @@ func (pg *Database) SetEpochClaimAndInsertProofsTransaction(
}

query2 := `
UPDATE
UPDATE
output
SET
SET
hash = @hash,
output_hashes_siblings = @outputHashesSiblings
WHERE
WHERE
id = @id
`

Expand Down

0 comments on commit 1dab403

Please sign in to comment.