You need to reset the ecu before it can be recoded to car and with the Astra H, the CIM has to be reset before replacing with a new part as i've just done one.
You also have to re-align the UEC, REC, IPC and the ECU then setup the CAN H, CAN M and CAN L, then if needed alter the variant coding. Also you need the transponder keys recoding as well.