public static bool ContainsKey <TKey>(this LightningTransaction txn, LightningDatabase db, TKey key) { var keyBytes = db.ToBytes(key); return(txn.ContainsKey(db, keyBytes)); }
/// <summary> /// Check whether data exists in database. /// </summary> /// <param name="txn">A transaction</param> /// <param name="key">Key.</param> /// <returns>True if key exists, false if not.</returns> public static bool ContainsKey(this LightningTransaction txn, byte[] key) { return(txn.ContainsKey(txn.OpenDatabase(), key)); }