4 ms·
The story I was told from Bitcoin developers was that it was done for code performance reasons. However, since the less-than check goes back all the way to the
by Jasper_ 6y ago
The story I was told from Bitcoin developers was that it was done for code performance reasons. However, since the less-than check goes back all the way to the code's "Initial commit" [0], I'm not sure if that's fully accurate -- it might have been based on correspondence from the original author. At the very least, the misconception comes from Bitcoin's own whitepaper.
[0] https://github.com/bitcoin/bitcoin/blob/e071a3f6c06f41068ad17134189a4ac3073ef76b/main.cpp#L1179-L1181 https://github.com/bitcoin/bitcoin/blob/e071a3f6c06f41068ad1...
- nemo1618 6y agoWeird. That doesn't make any sense to me. btw, the whitepaper probably used "number of leading zeros" because that's what Hashcash does.
- monokh 6y agoThe article mentions the hash is required to begin with a certain number of 0s in hex digits (half byte) whereas the Bitcoin whitepaper refers to it as number of bits. I'm unsure about the comparison (== or >) but the whitepaper seems accurate with regards to the target.