anchor.diff:                                  #state{}.
   process_downstream(<<?RES_MAGIC:8, _/binary>> = Packet,
                      State) ->
  -    case State#state.dump_file of
  -        undefined -> ok;
  -        File -> file:write(File, Packet)
  -    end,
       State#state.upstream_sender ! Packet,
       State.
   
  
positive.code:                 takeover :: boolean(),
                  takeover_done :: boolean(),
                  takeover_msgs_seen = 0 :: non_neg_integer(),
                  last_seen,
                  dump_file :: file:io_device() | undefined
                 }).
  
  %% external API
  
negative.code:       takeover_done=false
       },
      erlang:process_flag(trap_exit, true),
      gen_server:enter_loop(?MODULE, [], State).
  
  upstream_sender_loop(Upstream) ->
      receive
  