code: @Nullable
      TransactionOutput getConnectedOutput(Map<Sha256Hash, Transaction> transactions) {
          Transaction tx = transactions.get(outpoint.getHash());
          if (tx == null)
              return null;
          return tx.getOutputs().get((int) outpoint.getIndex());
      }
docs: Locates the referenced output from the given pool of transactions.
  
  @return The TransactionOutput or null if the transactions map doesn't contain the referenced tx.