From 0fc3472705b617620687b32b99fbc305c6fc506c Mon Sep 17 00:00:00 2001 From: crypto-facs <84574577+crypto-facs@users.noreply.github.com> Date: Sat, 3 Jul 2021 06:21:17 -0400 Subject: [PATCH] rpc: fix parent hash format (#222) --- ethereum/rpc/types/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/rpc/types/utils.go b/ethereum/rpc/types/utils.go index b380920a..17fea239 100644 --- a/ethereum/rpc/types/utils.go +++ b/ethereum/rpc/types/utils.go @@ -178,7 +178,7 @@ func FormatBlock( return map[string]interface{}{ "number": hexutil.Uint64(header.Height), "hash": hexutil.Bytes(header.Hash()), - "parentHash": hexutil.Bytes(header.LastBlockID.Hash), + "parentHash": common.BytesToHash(header.LastBlockID.Hash.Bytes()), "nonce": ethtypes.BlockNonce{}, // PoW specific "sha3Uncles": ethtypes.EmptyUncleHash, // No uncles in Tendermint "logsBloom": bloom,