It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
def check_prefix(pre_num, prefix, p_hash): # Check the first 'pre_num' bits of both 'prefix' and 'p_hash' and see if they match
assert len(prefix) * 8 >= pre_num, "prefix length too large"
byte_pos = 0
while pre_num > 8: # This compares the first complete bytes as bytes if the pre_num is higher than 8 bits
if prefix[byte_pos] != p_hash[byte_pos]:
return False
pre_num = pre_num - 8
byte_pos = byte_pos + 1
mask_prefix = (((1 << (8 - pre_num)) - 1) ^ 0xff) & int(prefix[byte_pos].encode('hex'), 16)
mask_hash = (((1 << (8 - pre_num)) - 1) ^ 0xff) & int(p_hash[byte_pos].encode('hex'), 16)
if mask_prefix == mask_hash: # In order to check only the first 'prebits' bits of the byte, we mask both bytes to change all bits past 'prebits' length to 0
return True
else:
return False
0361e5c0bff39f18621693da42cd343d60e3e14b4e9eb46b220eb310a484fcebab
cc411aab02edcd3bccf484a9ba5280d4a774e6f81eac8ebec9cb1c2e8f73020a
0361e5c0bff39f18621693da42cd343d60e3e14b4e9eb46b220eb310a484fcebab
waPYjXyrTrvXjZHmMGdqs9YTegpRDpx97H5G3xqLehkgyrrZKsxGCmnwKexpZjXTCskUWwYywdUvrZK7L2vejeVZSYHVns61gm8VfU
Version: 0x2b = 43
Options: 0x00 = 0
scanKey: 0361e5c0bff39f18621693da42cd343d60e3e14b4e9eb46b220eb310a484fcebab
spndKey: 02a60d70cfba37177d8239d018185d864b2bdd0caf5e175fd4454cc006fd2d75ac
sigNeed: 1
Prefix : /0
0361e5c0bff39f18621693da42cd343d60e3e14b4e9eb46b220eb310a484fcebab