private void executeLoadFromDisk() {
      if (configuration.getEnableSaveRestore()) {
        final File saveFile = configuration.getSaveFile();
        if (saveFile.exists()) {
          LOG.info("Loading transaction pool content from file {}", saveFile);
          try (final BufferedReader br =
              new BufferedReader(new FileReader(saveFile, StandardCharsets.US_ASCII))) {
            final Map<String, Long> stats =
                br.lines()
                    .takeWhile(unused -> !isCancelled.get())
                    .map(
                        line -> {
                          final var scoreStr = parseScore(line);
                          final byte score =
                              scoreStr.isEmpty() ? MAX_SCORE : Byte.parseByte(scoreStr);
                          final boolean isLocal = line.charAt(scoreStr.length()) == 'l';
                          final Transaction tx =
                              Transaction.readFrom(
                                  RLP.input(
                                      Bytes.fromBase64String(
                                          line.substring(scoreStr.length() + 1))),
                                  EncodingContext.POOLED_TRANSACTION);

                          final ValidationResult<TransactionInvalidReason> result =
                              addTransaction(tx, isLocal, score);
                          return result.isValid() ? "OK" : result.getInvalidReason().name();
                        })
                    .collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));

            br.close();

            final var added = stats.getOrDefault("OK", 0L);
            final var processedLines = stats.values().stream().mapToLong(Long::longValue).sum();

            LOG.debug("Restored transactions stats {}", stats);

            if (isCancelled.get()) {
              LOG.info(
                  "Added {} transactions of {} loaded from file {}, before operation was cancelled",
                  added,
                  processedLines,
                  saveFile);
              removeProcessedLines(saveFile, processedLines);
            } else {
              LOG.info(
                  "Added {} transactions of {} loaded from file {}, deleting file",
                  added,
                  processedLines,
                  saveFile);
              saveFile.delete();
            }
          } catch (IOException e) {
            LOG.error("Error while loading txpool content from disk", e);
          }
        }
      }
    }
Maintains the set of pending transactions received from JSON-RPC or other nodes. Transactions are
removed automatically when they are included in a block on the canonical chain and re-added if a
re-org removes them from the canonical chain again.

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