def add_input(txin)
      raise ArgumentError, "Input is missing" if !txin
      if !(txin.transaction == nil || txin.transaction == self)
        raise ArgumentError, "Can't add an input to a transaction when it references another transaction" # sanity check
      end
      txin.transaction = self
      txin.index = @inputs.size
      @inputs << txin
      self
    end
def add_input(txin)
      raise ArgumentError, "Input is missing" if !txin
      if !(txin.transaction == nil || txin.transaction == self)
        raise ArgumentError, "Can't add an input to a transaction when it references another transaction" # sanity check
      end
      txin.transaction = self
      txin.index = @inputs.size
      @inputs << txin
      self
    end
Adds another input to the transaction.