vsergeev / ntgbtminer

A no thrills getblocktemplate Bitcoin miner, written in Python.
MIT License
84 stars 42 forks source link

Incorrect logic in tx_compute_merkle_root #7

Closed user46378 closed 4 years ago

user46378 commented 4 years ago

I'm not sure, but I think there is an error here:

https://github.com/vsergeev/ntgbtminer/blob/d99f735329ae753fc4f808ea3e327648eb626b66/ntgbtminer.py#L255

vsergeev commented 4 years ago

What do you think the error is?

>>> hashes = ["abc", "def", "123", "456"]
>>> concat = hashes.pop(0) + hashes.pop(0)
>>> concat
'abcdef'
>>> hashes
['123', '456']
>>>