Skip to content

Commit

Permalink
removed changes that were not done by me
Browse files Browse the repository at this point in the history
  • Loading branch information
CJPotter10 committed Jul 19, 2024
1 parent bc8da33 commit 54f1fb5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions x/bridge/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ func (k Keeper) GetCurrentValidatorsEVMCompatible(ctx context.Context) ([]*types
for _, validator := range validators {
evmAddress, err := k.OperatorToEVMAddressMap.Get(ctx, validator.GetOperator())
if err != nil {
k.Logger(ctx).Info("Error getting EVM address from operator address", "error", err)
continue // Skip this validator if the EVM address is not found
}
adjustedPower := validator.GetConsensusPower(layertypes.PowerReduction)
Expand Down
4 changes: 2 additions & 2 deletions x/bridge/keeper/query_get_attestation_data_by_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func (q Querier) GetAttestationDataBySnapshot(goCtx context.Context, req *types.
return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("snapshot not found for snapshot %s", snapshot))
}
queryId := snapshotData.QueryId
timestampTime := time.UnixMilli(snapshotData.Timestamp)
timestampTime := time.Unix(snapshotData.Timestamp, 0)

aggReport, err := q.k.oracleKeeper.GetAggregateByTimestamp(ctx, queryId, timestampTime)
if err != nil {
return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("aggregate not found for queryId %s and timestamp %d", hex.EncodeToString(queryId), snapshotData.Timestamp))
return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("aggregate not found for queryId %s and timestamp %s", queryId, timestampTime))
}

queryIdStr := hex.EncodeToString(queryId)
Expand Down
2 changes: 1 addition & 1 deletion x/bridge/keeper/query_get_snapshots_by_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (q Querier) GetSnapshotsByReport(ctx context.Context, req *types.QueryGetSn
}
timestampTime := time.Unix(timestampInt, 0)

key := crypto.Keccak256([]byte(hex.EncodeToString(queryIdBytes) + fmt.Sprint(timestampTime.UnixMilli()/1000)))
key := crypto.Keccak256([]byte(hex.EncodeToString(queryIdBytes) + fmt.Sprint(timestampTime.UnixMilli())))
snapshots, err := q.k.AttestSnapshotsByReportMap.Get(ctx, key)
if err != nil {
return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("snapshots not found for queryId %s and timestamp %s", queryIdStr, timestampStr))
Expand Down

0 comments on commit 54f1fb5

Please sign in to comment.