enhance api for subnet project (#289)

This commit is contained in:
Liam 2023-07-14 20:04:01 +10:00 committed by GitHub
parent 060d9ce26f
commit 96f28b8bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,7 @@ type V2BlockInfo struct {
Number *big.Int
ParentHash common.Hash
Committed bool
Miner common.Hash
EncodedRLP string
Error string
}
@ -207,6 +208,7 @@ func (api *API) GetV2BlockByHeader(header *types.Header, uncle bool) *V2BlockInf
Number: header.Number,
Round: round,
Committed: committed,
Miner: header.Coinbase.Hash(),
EncodedRLP: base64.StdEncoding.EncodeToString(encodeBytes),
}
return block