Correct keyblock() type

This commit is contained in:
2026-05-10 21:02:23 +09:00
parent da92d80334
commit e595991616
+4 -3
View File
@@ -125,13 +125,14 @@
% "info" => contract_byte_array(),
% "miner" => account_id(),
% "nonce" => non_neg_integer(),
% "pow" => [non_neg_integer()],
% "prev_hash" => microblock_hash(),
% "prev_key_hash" => keyblock_hash(),
% "seal" => #{"data" => [int()],
% "signature" => signature()}
% "state_hash" => block_state_hash(),
% "target" => non_neg_integer(),
% "time" => non_neg_integer(),
% "version" => 5}.
% "version" => 1}.
% </pre>
-type microblock_header() :: #{string() => term()}.
% <pre>
@@ -353,7 +354,7 @@ top_height() ->
-spec top_block() -> {ok, TopBlock} | {error, Reason}
when TopBlock :: microblock_header(),
when TopBlock :: microblock_header() | keyblock(),
Reason :: chain_error().
%% @doc
%% Returns the header of the current top block.