BitSharp.Esent.EsentChainStateCursor.TryRemoveUnspentTxOutput C# (CSharp) Method

TryRemoveUnspentTxOutput() public method

public TryRemoveUnspentTxOutput ( TxOutputKey txOutputKey ) : bool
txOutputKey TxOutputKey
return bool
        public bool TryRemoveUnspentTxOutput(TxOutputKey txOutputKey)
        {
            CheckWriteTransaction();

            using (SetSessionContext())
            {
                Api.JetSetCurrentIndex(this.jetSession, this.unspentTxOutputTableId, "IX_TxOutputKey");
                Api.MakeKey(this.jetSession, this.unspentTxOutputTableId, DbEncoder.EncodeTxOutputKey(txOutputKey), MakeKeyGrbit.NewKey);
                if (Api.TrySeek(this.jetSession, this.unspentTxOutputTableId, SeekGrbit.SeekEQ))
                {
                    Api.JetDelete(this.jetSession, this.unspentTxOutputTableId);

                    return true;
                }
                else
                {
                    return false;
                }
            }
        }