anchor.diff:              ok
       end,
   
  +    % Restart node
       UpdatedConfig = RestartFun(WorkerP2),
       UpdatedSessIdP2 = test_config:get_user_session_id_on_provider(UpdatedConfig, User1, P2),
   
  +    % Verify transfers
  +    TransferIdsToVerify = case RestartType of
  +        kill ->
  +            % After node killing, it is possible that status in document is not updated
  +            % if its link is already in past tree
  +            TransferIds -- get_past_transfer_links(WorkerP2, SpaceId);
  +        _ ->
  +            TransferIds
  +    end,
       lists:foreach(fun(TransferId) ->
           multi_provider_file_ops_test_base:await_replication_end(WorkerP2, TransferId, Attempts, get_effective)
  -    end, TransferIds),
  -
  -    FilesToCheckDistribution = case Restart of
  +    end, TransferIdsToVerify),
  +
  +    % Verify if data has been replicated
  +    FilesToCheckDistribution = case RestartType of
           kill -> []; % documents with transferred blocks could be lost
  -        stop -> Files2; % on demand transfers could be lost
  +        gentle_stop -> Files2; % on demand transfers could be lost
           link -> AllFiles
       end,
       lists:foreach(fun(File) ->
  
positive.code: 
  -export([
      rtransfer_restart_test/1,
      node_stop_test/1,
      node_restart_test/1
  ]).
  
  % For RPC
  -export([count_missing_transfer_links_in_db/2]).
  
  all() -> [
      rtransfer_restart_test,
      node_stop_test,
      node_restart_test
  ].
  
  -define(FILE_DATA, <<"1234567890abcd">>).
  
negative.code: 
      restart_test_base(Config, RestartFun, kill).
  
  restart_test_base(Config, RestartFun, RestartType) ->
      [P1, P2] = test_config:get_providers(Config),
      [WorkerP1] = test_config:get_provider_nodes(Config, P1),
      [WorkerP2] = test_config:get_provider_nodes(Config, P2),
  