Handling block reorgs in the wallet