anchor.diff:  %% @doc Handling cast messages
   %% @end 
   %%--------------------------------------------------------------------
  +handle_cast({state, NewState = #membership{node=Node,nodes=Nodes}}, State) ->
  +  %straight up replace our state
  +  Merged = NewState#membership{node=State#membership.node,gossip=State#membership.gossip},
  +  storage_manager:load(Nodes, Merged#membership.partitions, int_partitions_for_node(State#membership.node, Merged, all)),
  +  sync_manager:load(Nodes, Merged#membership.partitions, int_partitions_for_node(State#membership.node, Merged, all)),
  +  save_state(Merged),
  +  {noreply, Merged};
  +
   handle_cast({gossip_with, Server}, State = #membership{nodes = Nodes}) ->
  -  % share our state with target node - expects a response back, but we don't
  -  % want to wait for it
     Self = self(),
     GosFun =
       fun() ->
  -        ?infoFmt("start gossip at ~p~n", [lib_misc:now_float()]),
  -        {ok, RemoteState} = gen_server:call(Server, {share, State}),
  -        {ok, ModState} = gen_server:call(Self, {share, RemoteState}),
  -        ?infoFmt("end gossip at ~p~n", [lib_misc:now_float()])
  +        RemoteState = gen_server:call(Server, state),
  +        case vector_clock:compare(RemoteState#membership.version, State#membership.version) of
  +          equal -> %no gossip needed
  +            ok;
  +          _ -> % we should merge the results here.
  +            Merged = merge_states(State, RemoteState),
  +            gen_server:cast(Server, {state, Merged}),
  +            gen_server:cast(Self, {state, Merged})
  +        end
       end,
     spawn_link(GosFun),
     {noreply, State};
  
positive.code:   gen_server:cast(Server, stop).
  
  fire_gossip(Node) when is_atom(Node) ->
    ?infoFmt("firing gossip at ~p~n", [Node]),
  	gen_server:cast(membership, {gossip_with, {membership, Node}}).
  
  %%====================================================================
  %% gen_server callbacks
  
negative.code:         merge_states(RemoteState, State)
    end,
    #membership{node=Node,nodes=Nodes,partitions=Parts} = Merged,
    storage_manager:load(Nodes, Parts, int_partitions_for_node(Node, Merged, all)),
    sync_manager:load(Nodes, Parts, int_partitions_for_node(Node, Merged, all)),
    save_state(Merged),
    {ok, Merged}.
  
  