incorred function description in comment #19

Closed
opened 2026-01-26 06:36:56 +09:00 by uwiger · 0 comments
Owner

hakuzaru/src/hz.erl Lines 356 to 363 in 48bcccdf23
-spec top_block() -> {ok, TopBlock} | {error, Reason}
when TopBlock :: microblock_header(),
Reason :: chain_error().
%% @doc
%% Returns the current block height as an integer.
top_block() ->
request("/v3/headers/top").

The comment is wrong. The spec says that it returns a header, not the height as an integer.

https://git.qpq.swiss/QPQ-AG/hakuzaru/src/commit/48bcccdf23c38da4ed59f41e1c45e19da9499ef4/src/hz.erl#L356-L363 The comment is wrong. The spec says that it returns a header, not the height as an integer.
zxq9 closed this issue 2026-05-10 15:52:53 +09:00
Sign in to join this conversation.