mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
add timestamp in v2 block response (#290)
This commit is contained in:
parent
96f28b8bc6
commit
2c1aba814e
1 changed files with 2 additions and 0 deletions
|
|
@ -41,6 +41,7 @@ type V2BlockInfo struct {
|
|||
ParentHash common.Hash
|
||||
Committed bool
|
||||
Miner common.Hash
|
||||
Timestamp *big.Int
|
||||
EncodedRLP string
|
||||
Error string
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue