src/main/Block.java
public boolean addTransaction(Transaction t){
        if(t == null){return false;}
        if(previousHash == null){return false;}

        if(t.processTransaction() != true){
            System.out.println("Transaction failed to process. Discarded");
            return false;
        }
        transactions.add(t);
        return true;
    }
// Adds a transaction to the block
Adds a transaction to the block
Adds a transaction to the block
public boolean addTransaction(Transaction t){
        if(t == null){return false;}
        if(previousHash == null){return false;}
        if(t.processTransaction() != true){
            System.out.println("Transaction failed to process. Discarded");
            return false;
        }
        transactions.add(t);
        return true;
    }
public boolean addTransaction ( Transaction t ) { if ( t == null ) { return false ; } if ( previousHash == null ) { return false ; } if ( t . processTransaction ( ) != true ) { System . out . println ( "Transaction failed to process. Discarded" ) ; return false ; } transactions . add ( t ) ; return true ; }
Adds a transaction to the block
Adds a transaction to the block