Particle acceleration in dipolarization events