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;
}
}
}