private void DeleteBlockIndex(EsentBlockTxesCursor cursor, UInt256 blockHash)
{
Api.JetSetCurrentIndex(cursor.jetSession, cursor.blockIndexTableId, "IX_BlockHash");
Api.MakeKey(cursor.jetSession, cursor.blockIndexTableId, DbEncoder.EncodeUInt256(blockHash), MakeKeyGrbit.NewKey);
if (Api.TrySeek(cursor.jetSession, cursor.blockIndexTableId, SeekGrbit.SeekEQ))
Api.JetDelete(cursor.jetSession, cursor.blockIndexTableId);
else
throw new InvalidOperationException();
}
}