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

TryGetBlockUnmintedTxes() public method

public TryGetBlockUnmintedTxes ( UInt256 blockHash, IImmutableList &unmintedTxes ) : bool
blockHash UInt256
unmintedTxes IImmutableList
return bool
        public bool TryGetBlockUnmintedTxes(UInt256 blockHash, out IImmutableList<UnmintedTx> unmintedTxes)
        {
            CheckTransaction();

            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))
                {
                    var unmintedTxesBytes = Api.RetrieveColumn(this.jetSession, this.unmintedTxTableId, this.unmintedDataColumnId);

                    unmintedTxes = DataDecoder.DecodeUnmintedTxList(unmintedTxesBytes);
                    return true;
                }
                else
                {
                    unmintedTxes = null;
                    return false;
                }
            }
        }