sgminer-dev / sgminer

Scrypt GPU miner
GNU General Public License v3.0
633 stars 825 forks source link

nonce endian in share logs #454

Open zerocoolys opened 7 years ago

zerocoolys commented 7 years ago

Hi all ,

I found the nonce in share logs (with command --sharelog) is not the correct endian, if you want to check the data with hash function. Need to change endian manually.

So I wonder if it can be output in correct endian, will not make people misunderstanding.

I was checking the share data not working with my blake hash function a whole night :(

For exmaple: the current output is

04000000af6df0adc0ba3ec9bef659a6d443a643842ca37738cfab876b01000000000000e1dfb17b876f1a1d3f1afc2c95c8c86b11196d43ea4b7ae39a8b35b86feb658d2dd0538af4e8b00b1332ba96f19e740e42a121e1782d0d5e9e92294715fe0caa01008d3391d1ea1e05000700d8a100005684011ad606f36e0100000053550200a0130000e5c27259**83245f08**1f66a736ba01000000000000000000000000000000000000000000000000000004000000

but should convert to

04000000af6df0adc0ba3ec9bef659a6d443a643842ca37738cfab876b01000000000000e1dfb17b876f1a1d3f1afc2c95c8c86b11196d43ea4b7ae39a8b35b86feb658d2dd0538af4e8b00b1332ba96f19e740e42a121e1782d0d5e9e92294715fe0caa01008d3391d1ea1e05000700d8a100005684011ad606f36e0100000053550200a0130000e5c27259**085f2408**1f66a736ba01000000000000000000000000000000000000000000000000000004000000

for hashing.