@Override
  public TransactionAddedResult addTransaction(
      final PendingTransaction transaction, final Optional<Account> maybeSenderAccount) {

    final TransactionAddedResult transactionAddedStatus =
        internalAddTransaction(transaction, maybeSenderAccount);
    if (transactionAddedStatus.equals(ADDED)) {
      if (!transaction.isReceivedFromLocalSource()) {
        remoteTransactionAddedCounter.inc();
      } else {
        localTransactionAddedCounter.inc();
      }
    }
    return transactionAddedStatus;
  }
Holds the current set of pending transactions with the ability to iterate them based on priority
for mining or look-up by hash.

<p>This class is safe for use across multiple threads.
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/sorter/AbstractPendingTransactionsSorter.java