eth, internal/ethapi: make RPC block miner field show block sealer correctly (#23312)

Makes the RPC block return the POA sealer for clique blocks on the 'miner' field (was previously zeroes)
This commit is contained in:
陈佳
2021-08-18 00:55:18 +08:00
committed by GitHub
parent 16ecdd5839
commit 57feabea66
2 changed files with 9 additions and 7 deletions

View File

@ -342,7 +342,7 @@ func (api *PrivateDebugAPI) GetBadBlocks(ctx context.Context) ([]*BadBlockArgs,
} else {
blockRlp = fmt.Sprintf("0x%x", rlpBytes)
}
if blockJSON, err = ethapi.RPCMarshalBlock(block, true, true); err != nil {
if blockJSON, err = ethapi.RPCMarshalBlock(block, true, true, api.eth.engine); err != nil {
blockJSON = map[string]interface{}{"error": err.Error()}
}
results = append(results, &BadBlockArgs{