code: func (journal *txJournal) load(add func([]*types.Transaction) []error) error {
  	// Skip the parsing if the journal file doesn't exist at all
  	if _, err := os.Stat(journal.path); os.IsNotExist(err) {
  		return nil
  	}
  	// Open the journal for loading any past transactions
  	input, err := os.Open(journal.path)
  	if err != nil {
  		return err
  	}
  	defer input.Close()
  
  	// Temporarily discard any journal additions (don't double add on load)
  	journal.writer = new(devNull)
  	defer func() { journal.writer = nil }()
  
  	// Inject all transactions from the journal into the pool
  	stream := rlp.NewStream(input, 0)
  	total, dropped := 0, 0
  
  	// Create a method to load a limited batch of transactions and bump the
  	// appropriate progress counters. Then use this method to load all the
  	// journaled transactions in small-ish batches.
  	loadBatch := func(txs types.Transactions) {
  		for _, err := range add(txs) {
  			if err != nil {
  				log.Debug("Failed to add journaled transaction", "err", err)
  				dropped++
  			}
  		}
  	}
  	var (
  		failure error
  		batch   types.Transactions
  	)
  	for {
  		// Parse the next transaction and terminate on error
  		tx := new(types.Transaction)
  		if err = stream.Decode(tx); err != nil {
  			if err != io.EOF {
  				failure = err
  			}
  			if batch.Len() > 0 {
  				loadBatch(batch)
  			}
  			break
  		}
  		// New transaction parsed, queue up for later, import if threshold is reached
  		total++
  
  		if batch = append(batch, tx); batch.Len() > 1024 {
  			loadBatch(batch)
  			batch = batch[:0]
  		}
  	}
  	log.Info("Loaded local transaction journal", "transactions", total, "dropped", dropped)
  
  	return failure
  }
docs: // load parses a transaction journal dump from disk, loading its contents into
  // the specified pool.