anchor.diff:  -type non_pos_integer() :: neg_integer() | 0.
   
   -type pool_db_key() ::
  -        {negated_fee(), aec_keys:pubkey(), non_neg_integer(), binary()}.
  +        ?KEY(negated_fee(), aec_keys:pubkey(), non_neg_integer(), binary()).
   -type pool_db_value() :: aetx_sign:signed_tx().
   -type pool_db() :: atom().
   
  
positive.code:     %%         the following key is unique for a transaction
      %%       * negative fee places high profit transactions at the beginning
      %%       * ordered_set type enables implicit overwrite of the same txs
      {-aetx:fee(Tx), aetx:origin(Tx), aetx:nonce(Tx), aetx_sign:hash(SignedTx)}.
  
  -spec select_pool_db_key_by_hash(pool_db(), binary()) -> {ok, pool_db_key()} | not_in_ets.
  select_pool_db_key_by_hash(Mempool, TxHash) ->
      case sel_return(ets_select(Mempool, [{ {{'$1', '$2', '$3', '$4'}, '_'},
                                             [{'=:=','$4', TxHash}],
                                             [{{'$1', '$2', '$3', '$4'}}] }], infinity)) of
          [Key] -> {ok, Key};
          [] -> not_in_ets
      end.
  
negative.code: -behaviour(gen_server).
  
  -define(MEMPOOL, mempool).
  -define(KEY(NegFee, Origin, Nonce, TxHash), {NegFee, Origin, Nonce, TxHash}).
  -define(VALUE_POS, 2).
  -define(KEY_AS_MATCH_SPEC_RESULT(NegFee, Origin, Nonce, TxHash),
          { %% Tuple of arity 1 where the single element is the mempool key tuple.
           ?KEY(NegFee, Origin, Nonce, TxHash)
          }).
  -define(KEY_NONCE_PATTERN(Sender), {?KEY('_', Sender, '$1', '_'), '_'}).
  
  %% API
  -export([ start_link/0
  