anchor.diff:      (SipHash bsl 1) bor UOrV.
   
   check_cycle(Nodes0) ->
  -  Nodes = lists:keysort(2, Nodes0),
  -  {Evens0, Odds} = lists:unzip(Nodes),
  -  Evens  = lists:sort(Evens0), %% Odd nodes are already sorted...
  -  UEvens = lists:usort(Evens),
  -  UOdds  = lists:usort(Odds),
  -  %% Check that all nodes appear exactly twice (i.e. each node has
  -  %% exactly two edges).
  -  case length(UEvens) == (?PROOFSIZE div 2) andalso
  -        length(UOdds) == (?PROOFSIZE div 2) andalso
  -        UOdds == Odds -- UOdds andalso UEvens == Evens -- UEvens of
  -      false ->
  -          {error, ?POW_BRANCH};
  -      true  ->
  -          [{X0, Y0}, {X1, Y0} | Nodes1] = Nodes,
  -          check_cycle(X0, X1, Nodes1)
  -  end.
  +    Nodes = lists:keysort(2, Nodes0),
  +    {Evens0, Odds} = lists:unzip(Nodes),
  +    Evens  = lists:sort(Evens0), %% Odd nodes are already sorted...
  +    UEvens = lists:usort(Evens),
  +    UOdds  = lists:usort(Odds),
  +    %% Check that all nodes appear exactly twice (i.e. each node has
  +    %% exactly two edges).
  +    case length(UEvens) == (?PROOFSIZE div 2) andalso
  +         length(UOdds) == (?PROOFSIZE div 2) andalso
  +         UOdds == Odds -- UOdds andalso UEvens == Evens -- UEvens of
  +        false ->
  +            {error, ?POW_BRANCH};
  +        true  ->
  +            [{X0, Y0}, {X1, Y0} | Nodes1] = Nodes,
  +            check_cycle(X0, X1, Nodes1)
  +    end.
   
   %% If we reach the end in the last step everything is fine
   check_cycle(X, X, []) ->
  
positive.code: find_node(X, [{X1, Y}, {X, Y} | Nodes], Acc) ->
      {X, X1, Nodes ++ Acc};
  find_node(X, [{X, _Y} | _], _Acc) ->
    {error, ?POW_DEAD_END};
  find_node(X, [N1, N2 | Nodes], Acc) ->
    find_node(X, Nodes, [N1, N2 | Acc]).
  
  %%------------------------------------------------------------------------------
  %% @doc
  
negative.code: 
  -define(debug(F, A), epoch_pow_cuckoo:debug(F, A)).
  -define(info(F, A),  epoch_pow_cuckoo:info(F, A)).
  -define(warning(F, A), epoch_pow_cuckoo:warning(F, A)).
  -define(error(F, A), epoch_pow_cuckoo:error(F, A)).
  
  -type os_pid() :: integer() | undefined.
  -type pow_cuckoo_solution() :: [integer()].
  
  -record(state, {os_pid :: os_pid(),
                  port :: port() | undefined,
                  buffer = [] :: string(),
                  target :: aec_pow:sci_int() | undefined,
                  parser :: output_parser_fun()}).
  
  -type output_parser_fun() :: fun((list(string()), #state{}) ->
                                          {'ok', term(), term()} | {'error', term()}).
  
  