anchor.diff:           periodic/1,
            handle_message/2]).
   
  --define(SET, partisan_membership_set).
  -
   -record(full_v1, {
       actor           ::  actor(),
       membership      ::  partisan_membership_set:t()
  
positive.code: 
  %% @doc When a node is connected, return the state, membership and outgoing message queue to be transmitted.
  join(#full_v1{membership=Membership0} = State0, _Node, #full_v1{membership=NodeMembership}) ->
      Membership = ?SET:merge(Membership0, NodeMembership),
      State = State0#full_v1{membership=Membership},
      MembershipList = membership_list(State),
      OutgoingMessages = gossip_messages(State),
  
negative.code:             {ok, MembershipList, OutgoingMessages, State0};
          false ->
              %% Merge, persist, reforward to peers.
              Membership = partisan_membership_set:merge(Membership0, Membership1),
              State = State0#full_v1{membership = Membership},
              MembershipList = membership_list(State),
              OutgoingMessages = gossip_messages(State),
  