public int getTransactionCount ( ) { if ( isFiltered ( ) ) { int ltransactionCount = transactionCount ; if ( ltransactionCount < 0 ) { ltransactionCount = 0 ; for ( int i = filteredBlock . getFilteredTransactionsCount ( ) - 1 ; i >= 0 ; -- i ) { FilteredTransaction filteredTransactions = filteredBlock . getFilteredTransactions ( i ) ; Common . HeaderType type = filteredTransactions . getType ( ) ; if ( type == Common . HeaderType . ENDORSER_TRANSACTION ) { ++ ltransactionCount ; } } transactionCount = ltransactionCount ; } return transactionCount ; } int ltransactionCount = transactionCount ; if ( ltransactionCount < 0 ) { ltransactionCount = 0 ; for ( int i = getEnvelopeCount ( ) - 1 ; i >= 0 ; -- i ) { try { EnvelopeInfo envelopeInfo = getEnvelopeInfo ( i ) ; if ( envelopeInfo . getType ( ) == TRANSACTION_ENVELOPE ) { ++ ltransactionCount ; } } catch ( InvalidProtocolBufferException e ) { throw new InvalidProtocolBufferRuntimeException ( e ) ; } } transactionCount = ltransactionCount ; } return transactionCount ; }
Number of endorser transaction found in the block .