pla
Member
Offline
Activity: 65
Merit: 10
|
|
February 20, 2011, 11:26:31 PM |
|
From blockexplorer what values would I need to pickle into the file? Did you ever find a solution to this? I tried the following: #include<stdio.h> #include<stdlib.h>
unsigned char Forward[80]= { 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x48, 0xc0, 0x4e, 0x58, 0xdc, 0xa8, 0xe1, 0xa2, 0xdf, 0x25, 0x13, 0x39, 0xc8, 0x1e, 0x2d, 0xfe, 0x1f, 0xf0, 0xe9, 0xd6, 0x55, 0xb7, 0xb4, 0xca, 0x42, 0x8d, 0x72, 0xfe, 0xbc, 0x10, 0x74, 0x70, 0xc4, 0xf8, 0x3e, 0x22, 0x4f, 0x96, 0x83, 0xa5, 0xc7, 0xfb, 0x24, 0xc4, 0xde, 0xce, 0x84, 0x12, 0xb9, 0xd9, 0x5d, 0xb2, 0x77, 0xc8, 0xdd, 0x75, 0x45, 0x1d, 0x4D, 0x57, 0x4A, 0x61, 0x1B, 0x02, 0x85, 0x52, 0x13, 0xAA, 0xD2, 0x0D }; unsigned char Reversed[80]= { 0x01, 0x00, 0x00, 0x00, 0x8d, 0x42, 0xca, 0xb4, 0xb7, 0x55, 0xd6, 0xe9, 0xf0, 0x1f, 0xfe, 0x2d, 0x1e, 0xc8, 0x39, 0x13, 0x25, 0xdf, 0xa2, 0xe1, 0xa8, 0xdc, 0x58, 0x4e, 0xc0, 0x48, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x45, 0x75, 0xdd, 0xc8, 0x77, 0xb2, 0x5d, 0xd9, 0xb9, 0x12, 0x84, 0xce, 0xde, 0xc4, 0x24, 0xfb, 0xc7, 0xa5, 0x83, 0x96, 0x4f, 0x22, 0x3e, 0xf8, 0xc4, 0x70, 0x74, 0x10, 0xbc, 0xfe, 0x72, 0x61, 0x4A, 0x57, 0x4D, 0x52, 0x85, 0x02, 0x1B, 0x0D, 0xD2, 0xAA, 0x13 };
int main(void) { FILE *fout; fout=fopen("manual.txt", "wb"); fwrite(Reversed, 1, 80, fout); fflush(fout); fclose(fout); return(0); }
(Dat1 has the values as they appear from blockexplorer, Dat2 has them bytewise-reversed - And spare me the comments about error handling ). Neither produces the "right" hash via sha256sum. Perhaps relevant, I notice that the "data" field from running "bitcoind getwork" has another 12 dwords worth of crap after the nonce, all zeros except for the 1st and 12th. That pads it to 128 bytes (not coincidentally, the value of that first dword after the nonce), but I see no particular reason why it contains anything after the nonce.
|