Skip to content

Commit

Permalink
Fix/trace timestamp (#80)
Browse files Browse the repository at this point in the history
* add timestamp to trace

* fix Timestamp
  • Loading branch information
aratz-lasa authored Jan 30, 2023
1 parent 82fa0a0 commit a2b7465
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ func (rs *Relay) prepareContents(submitBlockRequest *types.BuilderSubmitBlockReq
BlockNumber: s.Payload.Payload.Data.BlockNumber,
NumTx: uint64(len(s.Payload.Payload.Data.Transactions)),
},
Timestamp: s.Payload.Payload.Data.Timestamp,
Timestamp: uint64(time.Now().UnixMilli() / 1_000),
TimestampMs: uint64(time.Now().UnixMilli()),
},
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ type BidTraceExtended struct {

type BidTraceWithTimestamp struct {
BidTraceExtended
Timestamp uint64 `json:"timestamp,string"`
Timestamp uint64 `json:"timestamp,string"`
TimestampMs uint64 `json:"timestamp_ms,string"`
}

type BuilderGetValidatorsResponseEntrySlice []types.BuilderGetValidatorsResponseEntry
Expand Down

0 comments on commit a2b7465

Please sign in to comment.