void updateSelected(
      final Transaction transaction, final TransactionReceipt receipt, final long gasUsed) {
    selectedTransactions.add(transaction);
    transactionsByType
        .computeIfAbsent(transaction.getType(), type -> new ArrayList<>())
        .add(transaction);
    receipts.add(receipt);
    cumulativeGasUsed += gasUsed;
    LOG.atTrace()
        .setMessage("New selected transaction {}, total transactions {}, cumulative gas used {}")
        .addArgument(transaction::toTraceLog)
        .addArgument(selectedTransactions::size)
        .addArgument(cumulativeGasUsed)
        .log();
  }
Access to this field needs to be guarded, since it is possible to read it while another
processing thread is writing, when the selection time is over.
ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/txselection/TransactionSelectionResults.java