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

TryRemoveBlockUnmintedTxes() public method

public TryRemoveBlockUnmintedTxes ( UInt256 blockHash ) : bool
blockHash UInt256
return bool
        public bool TryRemoveBlockUnmintedTxes(UInt256 blockHash)
        {
            CheckWriteTransaction();

            using (SetSessionContext())
            {
                Api.JetSetCurrentIndex(this.jetSession, this.unmintedTxTableId, "IX_UnmintedBlockHash");

                Api.MakeKey(this.jetSession, this.unmintedTxTableId, DbEncoder.EncodeUInt256(blockHash), MakeKeyGrbit.NewKey);

                if (Api.TrySeek(this.jetSession, this.unmintedTxTableId, SeekGrbit.SeekEQ))
                {
                    Api.JetDelete(this.jetSession, this.unmintedTxTableId);
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }