anchor.diff:      send_msg(S, ?MSG_GET_HEADER_BY_HASH, Msg),
       {noreply, set_request(S, get_header_by_hash, From)}.
   
  +get_header(EncHash) when is_binary(EncHash) ->
  +    case aec_base58c:safe_decode(block_hash, EncHash) of
  +        {ok, Hash} ->
  +            get_header(hash, Hash);
  +        {error, Reason} ->
  +            #{ <<"result">> => error, <<"reason">> => Reason }
  +    end;
  +get_header(N) when N >= 0 ->
  +    get_header(height, N);
  +get_header(_) ->
  +    #{ <<"result">> => error, <<"reason">> => <<"bad request">> }.
  +
  +get_header(hash, Hash) ->
  +    get_header(fun aec_chain:get_header/1, Hash);
  +get_header(height, N) ->
  +    get_header(fun aec_chain:get_header_by_height/1, N);
  +get_header(Fun, Arg) ->
  +    case Fun(Arg) of
  +        {ok, Header} ->
  +            {ok, HH} = aec_headers:serialize_to_map(Header),
  +            #{result => ok, header => HH};
  +        error ->
  +            #{result => error, reason => <<"Block not found">>}
  +    end.
  +
  +
   %% -- Get Header by Height -----------------------------------------------------
   
   send_get_header_by_height(S = #{ status := error }, _From, _Hash) ->
  
positive.code:         <<"error">> ->
              gen_server:reply(From, {error, maps:get(<<"reason">>, MsgObj)})
      end,
      drop_request(S, get_n_successors).
  
  %% -- Get Block --------------------------------------------------------------
  
  
negative.code:         <<"error">> ->
              gen_server:reply(From, {error, maps:get(<<"reason">>, MsgObj)})
      end,
      remove_request_fld(S, get_header_by_hash).
  
  send_get_header_by_hash(S = #{ status := error }, _From, _Hash) ->
      {reply, {error, disconnected}, S};
  