anchor.diff:  handshake(internal, {application_packets,_,_}, _) ->
       {keep_state_and_data, [postpone]};
   handshake(cast, {new_write, WritesState, Version}, 
  -          #data{connection_states = ConnectionStates0} = StateData) ->
  +          #data{connection_states = ConnectionStates, static = Static} = StateData) ->
       {next_state, connection, 
  -     StateData#data{connection_states = 
  -                        ConnectionStates0#{current_write => WritesState},
  -                   negotiated_version = Version}};
  +     StateData#data{connection_states = ConnectionStates#{current_write => WritesState},
  +                    static = Static#static{negotiated_version = Version}}};
   handshake(info, dist_data, _) ->
       {keep_state_and_data, [postpone]};
   handshake(info, tick, _) ->
  
positive.code: %%%===================================================================
  
  handle_set_opts(
    From, Opts, #data{socket_options = SockOpts} = StateData) ->
      {keep_state, StateData#data{socket_options = set_opts(SockOpts, Opts)},
       [{reply, From, ok}]}.
  
  handle_common(
    {call, From}, {set_opts, Opts},
    #data{socket_options = SockOpts} = StateData) ->
      {keep_state, StateData#data{socket_options = set_opts(SockOpts, Opts)},
       [{reply, From, ok}]};
  handle_common(
    info, {'DOWN', Monitor, _, _, Reason},
    #data{connection_monitor = Monitor,
          dist_handle = Handle} = StateData) when Handle =/= undefined ->
      {next_state, death_row, StateData,
       [{state_timeout, 5000, Reason}]};
  handle_common(
    info, {'DOWN', Monitor, _, _, _},
    #data{connection_monitor = Monitor} = StateData) ->
      {stop, normal, StateData};
  handle_common(info, Msg, _) ->
      Report =
  
negative.code:                            transport_cb := Transport,
                             negotiated_version := Version,
                             renegotiate_at := RenegotiateAt}}, 
       #data{connection_states = ConnectionStates, static = Static0} = StateData0) ->
      Monitor = erlang:monitor(process, Pid),
      StateData = 
          StateData0#data{connection_states = ConnectionStates#{current_write => WriteState},
                          static = Static0#static{connection_pid = Pid,
                                                  connection_monitor = Monitor,
                                                  role = Role,
                                                  socket = Socket,
                                                  socket_options = SockOpts,
                                                  tracker = Tracker,
                                                  protocol_cb = Connection,
                                                  transport_cb = Transport,
                                                  negotiated_version = Version,
                                                  renegotiate_at = RenegotiateAt}},
      {next_state, handshake, StateData, [{reply, From, ok}]};
  init(_, _, _) ->
      %% Just in case anything else sneeks through
  