My question was geared more towards how the version is placed into header_bin, pool->header, and eventually work->data prior to being hashed.
The older block you listed gets hashed as: https://blockchain.info/block/00000000000000001ed61d4b7dd337c8eb1de0f21a0bd310a8733fb35f21991cformat=hex
02000000ea7ee4542a0d7496954302e67b99a4d1a3d1c2724f8ddb1a00000000000000007d28ed3cb6e06dc df8267afaa908999d48f2d4deba94b4e344c3e126a3c8b00b174e1f54e9db2418e5bc702
The newer as (and current blocks): https://blockchain.info/block/00000000000000000077140243064000ba35b22d3e2440e936a722b90cd09365?format=hex
00000020633a9073c5b1a5f32afefa4c1116c5bb9c593dfa419812000000000000000000515b81eeca6c575 93c90264ee1a1cb581fc3b7052e8adc23ec16db9917cf828bd33d575ac19100184dbccd28
Current blocks manually double sha256 hashed give correct results with the second format.
I guess I am not seeing in the code where the version is flipped after it is placed in as "20000000" prior to being hashed.
Thanks again for your help!
-Ken
Take a look at some blocks to see what version looks like these days, eg:
https://btc.com/00000000000000000077140243064000ba35b22d3e2440e936a722b90cd09365
Compare with older blocks, eg:
https://btc.com/00000000000000001ed61d4b7dd337c8eb1de0f21a0bd310a8733fb35f21991c
https://btc.com/00000000000000000077140243064000ba35b22d3e2440e936a722b90cd09365
Compare with older blocks, eg:
https://btc.com/00000000000000001ed61d4b7dd337c8eb1de0f21a0bd310a8733fb35f21991c