anchor.diff:  -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
       code_change/3]).
   
  --export([start_link/0, get_active/0, get_queue/0, push/2, remove_node/1,
  -         initial_sync/1]).
  +-export([start_link/0, get_active/0, get_queue/0, push/1, push/2,
  +    remove_node/1, initial_sync/1]).
   
   -include("mem3.hrl").
   -include_lib("couch/include/couch_db.hrl").
  
positive.code:     handle_replication_exit(State, Active);
  
  handle_info({'EXIT', Active, Reason}, State) ->
      case lists:keyfind(Active, 3, State#state.active) of
      {OldDbName, OldNode, _} ->
          twig:log(warn, "~p ~s -> ~p died: ~p", [?MODULE, OldDbName, OldNode,
              Reason]),
          timer:apply_after(5000, ?MODULE, push, [OldDbName, OldNode]);
      false -> ok end,
      handle_replication_exit(State, Active);
  
  
negative.code:         twig:log(debug, "adding ~s -> ~p to mem3_sync queue", [DbName, Node]),
          State#state{
              dict = dict:store({DbName,Node}, ok, D),
              waiting = Waiting ++ [Job]
          }
      end.
  
  