public override void ResolveCollision(UTXOIndex tablePrimary) { KeyValuePair <byte[], uint[]> collisionItem = CollisionTable.First(k => BitConverter.ToInt32(k.Key, 0) == tablePrimary.PrimaryKey); CollisionTable.Remove(collisionItem.Key); if (!tablePrimary.AreCollisionBitsFull() || !HasCountCollisions(tablePrimary.PrimaryKey, COUNT_COLLISIONS_MAX)) { tablePrimary.DecrementCollisionBits(Address); } collisionItem.Value[0] |= tablePrimary.GetCollisionBits(); PrimaryTable.Add(tablePrimary.PrimaryKey, collisionItem.Value); }
protected override void RemoveCollision(byte[] key) { CollisionTable.Remove(key); }