hasTransactionId method

bool hasTransactionId(
  1. String txId
)

Returns true if the Merkle tree contains the transaction identified by ID

txId - Transaction ID of the transaction we are looking for

Implementation

bool hasTransactionId(String txId) {

    //flip and reverse it !
    String hash = txId;  //FIXME: Another place where TransactionID is expected to be reversed and needs flippening. !!!

    List<String> txs = [];
    var height = _calcTreeHeight();
    _traverseMerkleTree(height, 0, txs: txs );
    return txs.indexOf(hash) != -1;
}