Skip to content

Commit

Permalink
add timestamp in v2 block response (ethereum#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjrjerome authored Jul 15, 2023
1 parent 96f28b8 commit 2c1aba8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions consensus/XDPoS/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type V2BlockInfo struct {
ParentHash common.Hash
Committed bool
Miner common.Hash
Timestamp *big.Int
EncodedRLP string
Error string
}
Expand Down Expand Up @@ -209,6 +210,7 @@ func (api *API) GetV2BlockByHeader(header *types.Header, uncle bool) *V2BlockInf
Round: round,
Committed: committed,
Miner: header.Coinbase.Hash(),
Timestamp: header.Time,
EncodedRLP: base64.StdEncoding.EncodeToString(encodeBytes),
}
return block
Expand Down

0 comments on commit 2c1aba8

Please sign in to comment.