mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
enhance api for subnet project (#289)
This commit is contained in:
parent
060d9ce26f
commit
96f28b8bc6
1 changed files with 2 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ type V2BlockInfo struct {
|
||||||
Number *big.Int
|
Number *big.Int
|
||||||
ParentHash common.Hash
|
ParentHash common.Hash
|
||||||
Committed bool
|
Committed bool
|
||||||
|
Miner common.Hash
|
||||||
EncodedRLP string
|
EncodedRLP string
|
||||||
Error string
|
Error string
|
||||||
}
|
}
|
||||||
|
|
@ -207,6 +208,7 @@ func (api *API) GetV2BlockByHeader(header *types.Header, uncle bool) *V2BlockInf
|
||||||
Number: header.Number,
|
Number: header.Number,
|
||||||
Round: round,
|
Round: round,
|
||||||
Committed: committed,
|
Committed: committed,
|
||||||
|
Miner: header.Coinbase.Hash(),
|
||||||
EncodedRLP: base64.StdEncoding.EncodeToString(encodeBytes),
|
EncodedRLP: base64.StdEncoding.EncodeToString(encodeBytes),
|
||||||
}
|
}
|
||||||
return block
|
return block
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue