src/main/Node.java
private boolean areOutputsSpent(Transaction tx){
        // Need to see if tx inputs are contained in the blockchain UTXOs
        for(TransactionInput i : tx.inputs){
            if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){
                return true;
            }
        }
        return false;
    }
// Check if transaction outputs have already been spent
Check if transaction outputs have already been spent
Check if transaction outputs have already been spent
private boolean areOutputsSpent(Transaction tx){
        for(TransactionInput i : tx.inputs){
            if(!currentBlockchain.UTXOs.containsKey(i.previousOutId)){
                return true;
            }
        }
        return false;
    }
private boolean areOutputsSpent ( Transaction tx ) { for ( TransactionInput i : tx . inputs ) { if ( ! currentBlockchain . UTXOs . containsKey ( i . previousOutId ) ) { return true ; } } return false ; }
Check if transaction outputs have already been spent
Check if transaction outputs have already been spent
// Need to see if tx inputs are contained in the blockchain UTXOs