code: private int guessTransactionsLength() {
          if (transactionBytesValid)
              return payload.length - HEADER_SIZE;
          if (transactions == null)
              return 0;
          int len = VarInt.sizeOf(transactions.size());
          for (Transaction tx : transactions) {
              // 255 is just a guess at an average tx length
              len += tx.length == UNKNOWN_LENGTH ? 255 : tx.length;
          }
          return len;
      }
docs: Provides a reasonable guess at the byte length of the transactions part of the block.
  The returned value will be accurate in 99% of cases and in those cases where not will probably slightly
  oversize.
  
  This is used to preallocate the underlying byte array for a ByteArrayOutputStream.  If the size is under the
  real value the only penalty is resizing of the underlying byte array.