src/main/java/org/iota/ict/ixi/model/Graph.java
public String startVertex(String data, String edge) {
        if(!InputValidator.isValidHash(data) || !InputValidator.isValidHash(edge))
            return null;
        TransactionBuilder transactionBuilder = new TransactionBuilder();
        transactionBuilder.trunkHash = data;
        transactionBuilder.branchHash = edge;
        transactionBuilder.tag = Trytes.padRight(Trytes.fromTrits(new byte[] { 0, 1, 0 }), Transaction.Field.TAG.tryteLength);
        Transaction transaction = transactionBuilder.build();
        transactionsByHash.put(transaction.hash, transaction);
        virtualTails.add(transaction.hash);
        return transaction.hash;
    }
/**
     * Starts a new vertex with trunk pointing to the data and branch pointing to the first vertex that is to be referenced.
     * @param data the data bundle fragment tail that is to be referenced
     * @param edge the first vertex tail that is to be referenced
     * @return the created vertex head
     */
Starts a new vertex with trunk pointing to the data and branch pointing to the first vertex that is to be referenced.
@param data the data bundle fragment tail that is to be referenced
@param edge the first vertex tail that is to be referenced
@return the created vertex head
Starts a new vertex with trunk pointing to the data and branch pointing to the first vertex that is to be referenced . @param data the data bundle fragment tail that is to be referenced @param edge the first vertex tail that is to be referenced @return the created vertex head
public String startVertex(String data, String edge) {
        if(!InputValidator.isValidHash(data) || !InputValidator.isValidHash(edge))
            return null;
        TransactionBuilder transactionBuilder = new TransactionBuilder();
        transactionBuilder.trunkHash = data;
        transactionBuilder.branchHash = edge;
        transactionBuilder.tag = Trytes.padRight(Trytes.fromTrits(new byte[] { 0, 1, 0 }), Transaction.Field.TAG.tryteLength);
        Transaction transaction = transactionBuilder.build();
        transactionsByHash.put(transaction.hash, transaction);
        virtualTails.add(transaction.hash);
        return transaction.hash;
    }
public String startVertex ( String data , String edge ) { if ( ! InputValidator . isValidHash ( data ) || ! InputValidator . isValidHash ( edge ) ) return null ; TransactionBuilder transactionBuilder = new TransactionBuilder ( ) ; transactionBuilder . trunkHash = data ; transactionBuilder . branchHash = edge ; transactionBuilder . tag = Trytes . padRight ( Trytes . fromTrits ( new byte [ ] { 0 , 1 , 0 } ) , Transaction . Field . TAG . tryteLength ) ; Transaction transaction = transactionBuilder . build ( ) ; transactionsByHash . put ( transaction . hash , transaction ) ; virtualTails . add ( transaction . hash ) ; return transaction . hash ; }
Starts a new vertex with trunk pointing to the data and branch pointing to the first vertex that is to be referenced.
Starts a new vertex with trunk pointing to the data and branch pointing to the first vertex that is to be referenced .