mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-01 12:38:40 +00:00
internal/ethapi: block not found print hex string
This commit is contained in:
parent
d4027f3d46
commit
2639b76d82
1 changed files with 2 additions and 2 deletions
|
|
@ -2013,7 +2013,7 @@ func (api *DebugAPI) GetRawHeader(ctx context.Context, blockNrOrHash rpc.BlockNu
|
||||||
}
|
}
|
||||||
header, _ := api.b.HeaderByHash(ctx, hash)
|
header, _ := api.b.HeaderByHash(ctx, hash)
|
||||||
if header == nil {
|
if header == nil {
|
||||||
return nil, fmt.Errorf("header #%d not found", hash)
|
return nil, fmt.Errorf("header %s not found", hash.Hex())
|
||||||
}
|
}
|
||||||
return rlp.EncodeToBytes(header)
|
return rlp.EncodeToBytes(header)
|
||||||
}
|
}
|
||||||
|
|
@ -2032,7 +2032,7 @@ func (api *DebugAPI) GetRawBlock(ctx context.Context, blockNrOrHash rpc.BlockNum
|
||||||
}
|
}
|
||||||
block, _ := api.b.BlockByHash(ctx, hash)
|
block, _ := api.b.BlockByHash(ctx, hash)
|
||||||
if block == nil {
|
if block == nil {
|
||||||
return nil, fmt.Errorf("block #%d not found", hash)
|
return nil, fmt.Errorf("block %s not found", hash.Hex())
|
||||||
}
|
}
|
||||||
return rlp.EncodeToBytes(block)
|
return rlp.EncodeToBytes(block)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue