mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +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
|
ParentHash common.Hash
|
||||||
Committed bool
|
Committed bool
|
||||||
Miner common.Hash
|
Miner common.Hash
|
||||||
|
Timestamp *big.Int
|
||||||
EncodedRLP string
|
EncodedRLP string
|
||||||
Error string
|
Error string
|
||||||
}
|
}
|
||||||
|
|
@ -209,6 +210,7 @@ func (api *API) GetV2BlockByHeader(header *types.Header, uncle bool) *V2BlockInf
|
||||||
Round: round,
|
Round: round,
|
||||||
Committed: committed,
|
Committed: committed,
|
||||||
Miner: header.Coinbase.Hash(),
|
Miner: header.Coinbase.Hash(),
|
||||||
|
Timestamp: header.Time,
|
||||||
EncodedRLP: base64.StdEncoding.EncodeToString(encodeBytes),
|
EncodedRLP: base64.StdEncoding.EncodeToString(encodeBytes),
|
||||||
}
|
}
|
||||||
return block
|
return block
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue