From 96f28b8bc67dd8bb78355c4b17b719a75f7bfa31 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 14 Jul 2023 20:04:01 +1000 Subject: [PATCH] enhance api for subnet project (#289) --- consensus/XDPoS/api.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/consensus/XDPoS/api.go b/consensus/XDPoS/api.go index 4a9b23d298..12ed542ee6 100644 --- a/consensus/XDPoS/api.go +++ b/consensus/XDPoS/api.go @@ -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