def standard?
      return false if version > MAX_STANDARD_VERSION
      return false if weight > MAX_STANDARD_TX_WEIGHT
      inputs.each do |i|
        # Biggest 'standard' txin is a 15-of-15 P2SH multisig with compressed keys (remember the 520 byte limit on redeemScript size).
        # That works out to a (15*(33+1))+3=513 byte redeemScript, 513+1+15*(73+1)+3=1627
        # bytes of scriptSig, which we round off to 1650 bytes for some minor future-proofing.
        # That's also enough to spend a 20-of-20 CHECKMULTISIG scriptPubKey, though such a scriptPubKey is not considered standard.
        return false if i.script_sig.size > 1650
        return false unless i.script_sig.push_only?
      end
      data_count = 0
      outputs.each do |o|
        return false unless o.script_pubkey.standard?
        data_count += 1 if o.script_pubkey.op_return?
        # TODO add non P2SH multisig relay(permitbaremultisig)
        # TODO add dust relay check
      end
      return false if data_count > 1
      true
    end
def standard?
      return false if version > MAX_STANDARD_VERSION
      return false if weight > MAX_STANDARD_TX_WEIGHT
      inputs.each do |i|
        # Biggest 'standard' txin is a 15-of-15 P2SH multisig with compressed keys (remember the 520 byte limit on redeemScript size).
        # That works out to a (15*(33+1))+3=513 byte redeemScript, 513+1+15*(73+1)+3=1627
        # bytes of scriptSig, which we round off to 1650 bytes for some minor future-proofing.
        # That's also enough to spend a 20-of-20 CHECKMULTISIG scriptPubKey, though such a scriptPubKey is not considered standard.
        return false if i.script_sig.size > 1650
        return false unless i.script_sig.push_only?
      end
      data_count = 0
      outputs.each do |o|
        return false unless o.script_pubkey.standard?
        data_count += 1 if o.script_pubkey.op_return?
        # TODO add non P2SH multisig relay(permitbaremultisig)
        # TODO add dust relay check
      end
      return false if data_count > 1
      true
    end
check this tx is standard.