mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-02 13:08:41 +00:00
graphql: handle missing block body in Raw resolver
This commit is contained in:
parent
4daaaadfc4
commit
bd28e43479
1 changed files with 1 additions and 1 deletions
|
|
@ -929,7 +929,7 @@ func (b *Block) RawHeader(ctx context.Context) (hexutil.Bytes, error) {
|
||||||
|
|
||||||
func (b *Block) Raw(ctx context.Context) (hexutil.Bytes, error) {
|
func (b *Block) Raw(ctx context.Context) (hexutil.Bytes, error) {
|
||||||
block, err := b.resolve(ctx)
|
block, err := b.resolve(ctx)
|
||||||
if err != nil {
|
if err != nil || block == nil {
|
||||||
return hexutil.Bytes{}, err
|
return hexutil.Bytes{}, err
|
||||||
}
|
}
|
||||||
return rlp.EncodeToBytes(block)
|
return rlp.EncodeToBytes(block)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue