Not a block of ice, rather, they used liquid oxygen instead of compressed oxygen (suitably warmed up before breathing, of course). Which neatly solved both the cooling problem and made sure their space suit backpacks could provide enough O2 for hours of EVA without needing to be changed often. It did cause problems of its own – the air the astronauts were breathing was very dry, for one thing, IIRC, which made them at risk for sore throat/laryngitis and the like.
Damn, I thought I’d read that they used LOX in their PLSS packs, but evidently I misremembered. Never mind. Sorry about that.
The PLSS packs used gaseous oxygen. At the end of all but the last day on the surface the crews would connect each PLSS to an oxygen hose in the LM ascent stage and recharge it. The actual oxygen tank was in the descent stage.
I truly am happy to see that this is the latest tech and don’t know why i feel a need to point out what I presented two years ago. i somtimes hate resentful people, but I gave a fairly terrible talk and take no legal claim on this. Still… https://www.youtube.com/watch?v=VntxukzvjJE