public bool TryRemoveHeader(UInt256 blockHash)
{
CheckWriteTransaction();
using (SetSessionContext())
{
Api.JetSetCurrentIndex(this.jetSession, this.headersTableId, "IX_BlockHash");
Api.MakeKey(this.jetSession, this.headersTableId, DbEncoder.EncodeUInt256(blockHash), MakeKeyGrbit.NewKey);
if (Api.TrySeek(this.jetSession, this.headersTableId, SeekGrbit.SeekEQ))
{
Api.JetDelete(this.jetSession, this.headersTableId);
return true;
}
else
{
return false;
}
}
}