Skip to content

Commit

Permalink
fixes after second review
Browse files Browse the repository at this point in the history
  • Loading branch information
miiu96 committed Apr 8, 2024
1 parent 1861827 commit ed38bf5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions data/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

// Transaction is a structure containing all the fields that need
//
// to be saved for a transaction. It has all the default fields
// plus some extra information for ease of search and filter
// to be saved for a transaction. It has all the default fields
// plus some extra information for ease of search and filter
type Transaction struct {
MBHash string `json:"miniBlockHash"`
Nonce uint64 `json:"nonce"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
"txHash": "63726f73732d6c6f67",
"order": 0,
"timestamp": 5040
}
}
4 changes: 3 additions & 1 deletion process/elasticproc/logsevents/logsAndEventsProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (
"github.com/multiversx/mx-chain-es-indexer-go/process/dataindexer"
)

const eventIDFormat = "%s-%d-%d"

// ArgsLogsAndEventsProcessor holds all dependencies required to create new instances of logsAndEventsProcessor
type ArgsLogsAndEventsProcessor struct {
PubKeyConverter core.PubkeyConverter
Expand Down Expand Up @@ -263,7 +265,7 @@ func (lep *logsAndEventsProcessor) prepareLogEvent(dbLog *data.Logs, event *data
TxOrder: execOrder,
OriginalTxHash: dbLog.OriginalTxHash,
Timestamp: dbLog.Timestamp,
ID: fmt.Sprintf("%s-%d-%d", dbLog.ID, shardID, event.Order),
ID: fmt.Sprintf(eventIDFormat, dbLog.ID, shardID, event.Order),
}

return dbEvent
Expand Down

0 comments on commit ed38bf5

Please sign in to comment.